Spaces:
Running
Running
from supabase import create_client | |
from typing import Optional | |
from functools import lru_cache | |
from dotenv import load_dotenv | |
from pydantic import BaseModel | |
load_dotenv() | |
import os | |
class Supabase_Settings(BaseModel): | |
SUPABASE_URL: str = os.getenv("SUPABASE_URL") | |
SUPABASE_ANON_KEY: str = os.getenv("SUPABASE_ANON_KEY") | |
SUPABASE_SERVICE_KEY: str = os.getenv("SUPABASE_SERVICE_KEY") | |
class Supabase_Client: | |
values = Supabase_Settings() | |
instance = create_client(values.SUPABASE_URL, values.SUPABASE_SERVICE_KEY) | |