File size: 390 Bytes
57e6e1c
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
from supabase import create_client, Client
import os

def get_supabase_client() -> Client:
    """Initializes and returns a Supabase client."""
    url: str = os.environ.get("SUPABASE_URL")
    key: str = os.environ.get("SUPABASE_KEY")
    if not url or not key:
        print("Supabase URL or Key not found in environment variables.")
        return None
    return create_client(url, key)