supabase-py
supabase-py copied to clipboard
httpx.ReadTimeout: timed out Supabase functions
Feature request
Is your feature request related to a problem? Please describe.
When calling an Edge Function using client.functions.invoke()
, if the function takes longer than 5 seconds to run I'll get a ReadTimeout
exception
Describe the solution you'd like
I would like a way to configure the HTTPX timeout for Edge Function calls, the same way we can currently configure PostgREST and Storage. Or a way to supply a custom HTTPX client to supafunc-py
Describe alternatives you've considered
The following will let me create a client with a longer timeout, but it's accessing private interfaces:
supabase: Client = create_client(url, key, options=client_options)
func_headers = supabase.functions.headers
func_url = supabase.functions.url
timeout_client = utils.SyncClient(timeout=300.0, base_url=func_url, headers=func_headers, follow_redirects=True)
supabase.functions._client = timeout_client