I've been faced SupabaseException: supabase_url is required. Here are codes
import os
from supabase import create_client, Client
url: str = os.environ.get('https://mine.supabase.co')
key: str = os.environ.get("xxxxminexxx")
supabase: Client = create_client(url, key)
SupabaseException: supabase_url is required.
supabase version : 1.0.4 python : 3.10.9
i don't know how to deal with this problem. Plz help.
- make account supabase https://supabase.com/
- pip install supabase
- Run code
- Error
If you are getting the environment variables from the operating system you should be checking for the variable name which you can setup with dotenv python package or a normal
export SUPABASE_URL="my-url-to-my-awesome-supabase-instance"
and not a url or anon_key as you have in your example. Take a look at the example below which is also outlined in the Supabase Python docs