mirror of
https://github.com/reconurge/flowsint.git
synced 2026-05-07 12:26:24 -05:00
19 lines
519 B
Python
19 lines
519 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")
|
|
|
|
def get_db(token=None):
|
|
|
|
supabase_url = os.getenv("SUPABASE_URL")
|
|
supabase_anon_key = os.getenv("SUPABASE_KEY")
|
|
supabase = create_client(supabase_url, supabase_anon_key)
|
|
return supabase |