supabase_functions 0.4.7__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: supabase_functions
3
- Version: 0.4.7
3
+ Version: 0.5.0
4
4
  Summary: Library for Supabase Functions
5
5
  Home-page: https://github.com/supabase-community/functions-py
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "supabase_functions"
3
- version = "0.4.7"
3
+ version = "0.5.0"
4
4
  description = "Library for Supabase Functions"
5
5
  authors = [
6
6
  "Joel Lee <joel@joellee.org>",
@@ -7,7 +7,7 @@ from ..utils import AsyncClient, __version__
7
7
 
8
8
 
9
9
  class AsyncFunctionsClient:
10
- def __init__(self, url: str, headers: Dict, verify: bool = True):
10
+ def __init__(self, url: str, headers: Dict, timeout: int, verify: bool = True):
11
11
  self.url = url
12
12
  self.headers = {
13
13
  "User-Agent": f"supabase-py/functions-py v{__version__}",
@@ -17,6 +17,7 @@ class AsyncFunctionsClient:
17
17
  base_url=self.url,
18
18
  headers=self.headers,
19
19
  verify=bool(verify),
20
+ timeout=timeout,
20
21
  follow_redirects=True,
21
22
  http2=True,
22
23
  )
@@ -7,7 +7,7 @@ from ..utils import SyncClient, __version__
7
7
 
8
8
 
9
9
  class SyncFunctionsClient:
10
- def __init__(self, url: str, headers: Dict, verify: bool = True):
10
+ def __init__(self, url: str, headers: Dict, timeout: int, verify: bool = True):
11
11
  self.url = url
12
12
  self.headers = {
13
13
  "User-Agent": f"supabase-py/functions-py v{__version__}",
@@ -17,6 +17,7 @@ class SyncFunctionsClient:
17
17
  base_url=self.url,
18
18
  headers=self.headers,
19
19
  verify=bool(verify),
20
+ timeout=timeout,
20
21
  follow_redirects=True,
21
22
  http2=True,
22
23
  )
@@ -1,7 +1,9 @@
1
1
  from httpx import AsyncClient as AsyncClient # noqa: F401
2
2
  from httpx import Client as BaseClient
3
3
 
4
- __version__ = "0.4.7"
4
+ __version__ = "0.5.0"
5
+
6
+ DEFAULT_FUNCTION_CLIENT_TIMEOUT = 5
5
7
 
6
8
 
7
9
  class SyncClient(BaseClient):