Initializing
You can initialize a new Supabase client using the create_client()
method.
The Supabase client is your entrypoint to the rest of the Supabase functionality and is the easiest way to interact with everything we offer within the Supabase ecosystem.
Parameters
The unique Supabase URL which is supplied when you create a new project in your project dashboard.
The unique Supabase Key which is supplied when you create a new project in your project dashboard.
Options to change the Auth behaviors.
The Postgres schema which your tables belong to. Must be on the list of exposed schemas in Supabase. Defaults to 'public'.
Optional headers for initializing the client.
Whether to automatically refresh the token when it expires. Defaults to `true`.
Whether to persist a logged in session to storage.
A storage provider. Used to store the logged in session.
Options passed to the realtime-py instance.
Timeout passed to the SyncPostgrestClient instance.
Timeout passed to the SyncStorageClient instance.
flow type to use for authentication.
import os
from supabase import create_client, Client
url: str = os.environ.get("SUPABASE_URL")
key: str = os.environ.get("SUPABASE_KEY")
supabase: Client = create_client(url, key)