Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion supabase_functions/_async/functions_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class AsyncFunctionsClient:
def __init__(self, url: str, headers: Dict, verify: bool = True):
def __init__(self, url: str, headers: Dict, timeout: int, verify: bool = True):
self.url = url
self.headers = {
"User-Agent": f"supabase-py/functions-py v{__version__}",
Expand All @@ -17,6 +17,7 @@ def __init__(self, url: str, headers: Dict, verify: bool = True):
base_url=self.url,
headers=self.headers,
verify=bool(verify),
timeout=timeout,
follow_redirects=True,
http2=True,
)
Expand Down
3 changes: 2 additions & 1 deletion supabase_functions/_sync/functions_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class SyncFunctionsClient:
def __init__(self, url: str, headers: Dict, verify: bool = True):
def __init__(self, url: str, headers: Dict, timeout: int, verify: bool = True):
self.url = url
self.headers = {
"User-Agent": f"supabase-py/functions-py v{__version__}",
Expand All @@ -17,6 +17,7 @@ def __init__(self, url: str, headers: Dict, verify: bool = True):
base_url=self.url,
headers=self.headers,
verify=bool(verify),
timeout=timeout,
follow_redirects=True,
http2=True,
)
Expand Down
2 changes: 2 additions & 0 deletions supabase_functions/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

__version__ = "0.4.6"

DEFAULT_FUNCTION_CLIENT_TIMEOUT = 5


class SyncClient(BaseClient):
def aclose(self) -> None:
Expand Down
1 change: 1 addition & 0 deletions tests/_async/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ def function_client():
"apiKey": mock_access_token(),
"Authorization": f"Bearer {mock_access_token()}",
},
timeout=10,
)
1 change: 1 addition & 0 deletions tests/_sync/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ def function_client():
"apiKey": mock_access_token(),
"Authorization": f"Bearer {mock_access_token()}",
},
timeout=10,
)