mirror of
https://github.com/reconurge/flowsint.git
synced 2026-05-10 15:14:23 -05:00
17 lines
426 B
Python
17 lines
426 B
Python
import os
|
|
from dotenv import load_dotenv
|
|
from supabase import create_client, Client
|
|
|
|
# Charger les variables d'environnement
|
|
load_dotenv()
|
|
|
|
SUPABASE_URL = os.getenv("SUPABASE_URL")
|
|
SUPABASE_KEY = os.getenv("SUPABASE_KEY")
|
|
|
|
if not SUPABASE_URL or not SUPABASE_KEY:
|
|
raise ValueError("Missing Supabase credentials")
|
|
|
|
# Création du client Supabase
|
|
def get_db() -> Client:
|
|
return create_client(SUPABASE_URL, SUPABASE_KEY)
|