aubm / backend /services /supabase_service.py
cesjavi's picture
Deploy Aubm Docker Space
81ff144
raw
history blame contribute delete
487 Bytes
from supabase import create_client, Client
from services.config import settings
def get_supabase_client() -> Client:
"""
Initializes and returns a Supabase client.
"""
if not settings.SUPABASE_URL or not settings.SUPABASE_SERVICE_ROLE_KEY:
raise ValueError("SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY must be set in environment.")
return create_client(settings.SUPABASE_URL, settings.SUPABASE_SERVICE_ROLE_KEY)
supabase: Client = get_supabase_client()