Spaces:
Sleeping
Sleeping
Download src/supabase_client.py from hamzagssima/psychocrowd-api: direct link, hf CLI and curl.
- Browser
- Download file 420 Bytes
-
https://huggingface.co/spaces/hamzagssima/psychocrowd-api/resolve/main/src/supabase_client.py
- Command line
-
hf download hf://spaces/hamzagssima/psychocrowd-api/src/supabase_client.py
-
curl -L -o supabase_client.py https://huggingface.co/spaces/hamzagssima/psychocrowd-api/resolve/main/src/supabase_client.py
420 Bytes
| """Supabase client initialization for PsychoCrowd.""" | |
| import os | |
| from supabase import create_client, Client | |
| from config import SUPABASE_URL, SUPABASE_KEY | |
| def get_supabase_client() -> Client: | |
| """Initialize and return the Supabase client.""" | |
| if not SUPABASE_URL or not SUPABASE_KEY: | |
| raise ValueError("SUPABASE_URL and SUPABASE_KEY must be set in .env") | |
| return create_client(SUPABASE_URL, SUPABASE_KEY) | |