Python: Overview

Realtime in Python only works with the asynchronous client. You can initialize a new Supabase client using the acreate_client() method.

Examples

acreate_client()

import os
import asyncio
from supabase import acreate_client, AsyncClient

url: str = os.environ.get("SUPABASE_URL")
key: str = os.environ.get("SUPABASE_KEY")

async def create_supabase():
  supabase: AsyncClient = await acreate_client(url, key)
  return supabase