from supabase import create_client from app.core.config import SUPABASE_KEY, SUPABASE_URL _supabase = None def get_supabase_client(): global _supabase if _supabase is not None: return _supabase if not SUPABASE_URL or not SUPABASE_KEY: print("⚠️ Supabase bilgileri .env içinde bulunamadı!") return None try: _supabase = create_client(SUPABASE_URL, SUPABASE_KEY) except Exception as exc: print(f"⚠️ Supabase client oluşturulamadı: {exc}") _supabase = None return _supabase