Spaces:
Sleeping
Sleeping
Download backend/db/database.py from Harsh200415/Mirror-Backend: direct link, hf CLI and curl.
- Browser
- Download file 361 Bytes
-
https://huggingface.co/spaces/Harsh200415/Mirror-Backend/resolve/main/backend/db/database.py
- Command line
-
hf download hf://spaces/Harsh200415/Mirror-Backend/backend/db/database.py
-
curl -L -o database.py https://huggingface.co/spaces/Harsh200415/Mirror-Backend/resolve/main/backend/db/database.py
361 Bytes
| import os | |
| from supabase import create_client, Client | |
| def _make_admin_client() -> Client: | |
| url = os.getenv("SUPABASE_URL") | |
| key = os.getenv("SUPABASE_SERVICE_KEY") | |
| if not url or not key: | |
| raise RuntimeError("SUPABASE_URL and SUPABASE_SERVICE_KEY must be set in .env") | |
| return create_client(url, key) | |
| supabase_admin = _make_admin_client() | |