Spaces:
Runtime error
Runtime error
Download app/core/supabase.py from dedalys-civ/dedalys-api: direct link, hf CLI and curl.
- Browser
- Download file 525 Bytes
-
https://huggingface.co/spaces/dedalys-civ/dedalys-api/resolve/main/app/core/supabase.py
- Command line
-
hf download hf://spaces/dedalys-civ/dedalys-api/app/core/supabase.py
-
curl -L -o supabase.py https://huggingface.co/spaces/dedalys-civ/dedalys-api/resolve/main/app/core/supabase.py
525 Bytes
| """ | |
| Dedalys Backend — Clients Supabase | |
| Initialisation des clients pour l'API et l'admin. | |
| """ | |
| from supabase import create_client, Client | |
| from app.core.config import settings | |
| # Client avec anon key — pour les opérations authentifiées utilisateur | |
| supabase: Client = create_client( | |
| settings.SUPABASE_URL, | |
| settings.SUPABASE_ANON_KEY | |
| ) | |
| # Client avec service_role key — pour les opérations admin (bypass RLS) | |
| supabase_admin: Client = create_client( | |
| settings.SUPABASE_URL, | |
| settings.SUPABASE_SERVICE_KEY | |
| ) | |