supabase_functions 0.4.5__tar.gz → 0.4.6__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.
- {supabase_functions-0.4.5 → supabase_functions-0.4.6}/PKG-INFO +1 -1
- {supabase_functions-0.4.5 → supabase_functions-0.4.6}/pyproject.toml +2 -2
- {supabase_functions-0.4.5 → supabase_functions-0.4.6}/supabase_functions/__init__.py +11 -9
- {supabase_functions-0.4.5 → supabase_functions-0.4.6}/supabase_functions/_async/functions_client.py +7 -2
- {supabase_functions-0.4.5 → supabase_functions-0.4.6}/supabase_functions/_sync/functions_client.py +7 -2
- {supabase_functions-0.4.5 → supabase_functions-0.4.6}/supabase_functions/utils.py +1 -1
- {supabase_functions-0.4.5 → supabase_functions-0.4.6}/LICENSE +0 -0
- {supabase_functions-0.4.5 → supabase_functions-0.4.6}/README.md +0 -0
- {supabase_functions-0.4.5 → supabase_functions-0.4.6}/supabase_functions/_async/__init__.py +0 -0
- {supabase_functions-0.4.5 → supabase_functions-0.4.6}/supabase_functions/_sync/__init__.py +0 -0
- {supabase_functions-0.4.5 → supabase_functions-0.4.6}/supabase_functions/errors.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "supabase_functions"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.6"
|
|
4
4
|
description = "Library for Supabase Functions"
|
|
5
5
|
authors = [
|
|
6
6
|
"Joel Lee <joel@joellee.org>",
|
|
@@ -21,7 +21,7 @@ isort = "^5.12.0"
|
|
|
21
21
|
pre-commit = "^3.4.0"
|
|
22
22
|
pyjwt = "^2.8.0"
|
|
23
23
|
pytest = ">=7.4.2,<9.0.0"
|
|
24
|
-
pytest-cov = "
|
|
24
|
+
pytest-cov = ">=4,<6"
|
|
25
25
|
unasync-cli = "^0.0.9"
|
|
26
26
|
pytest-asyncio = ">=0.21.1,<0.24.0"
|
|
27
27
|
respx = ">=0.20.2,<0.22.0"
|
|
@@ -10,22 +10,24 @@ __all__ = ["create_client"]
|
|
|
10
10
|
|
|
11
11
|
@overload
|
|
12
12
|
def create_client(
|
|
13
|
-
url: str, headers: dict[str, str], *, is_async: Literal[True]
|
|
14
|
-
) -> AsyncFunctionsClient:
|
|
15
|
-
...
|
|
13
|
+
url: str, headers: dict[str, str], *, is_async: Literal[True], verify: bool
|
|
14
|
+
) -> AsyncFunctionsClient: ...
|
|
16
15
|
|
|
17
16
|
|
|
18
17
|
@overload
|
|
19
18
|
def create_client(
|
|
20
|
-
url: str, headers: dict[str, str], *, is_async: Literal[False]
|
|
21
|
-
) -> SyncFunctionsClient:
|
|
22
|
-
...
|
|
19
|
+
url: str, headers: dict[str, str], *, is_async: Literal[False], verify: bool
|
|
20
|
+
) -> SyncFunctionsClient: ...
|
|
23
21
|
|
|
24
22
|
|
|
25
23
|
def create_client(
|
|
26
|
-
url: str,
|
|
24
|
+
url: str,
|
|
25
|
+
headers: dict[str, str],
|
|
26
|
+
*,
|
|
27
|
+
is_async: bool,
|
|
28
|
+
verify: bool = True,
|
|
27
29
|
) -> Union[AsyncFunctionsClient, SyncFunctionsClient]:
|
|
28
30
|
if is_async:
|
|
29
|
-
return AsyncFunctionsClient(url, headers)
|
|
31
|
+
return AsyncFunctionsClient(url, headers, verify)
|
|
30
32
|
else:
|
|
31
|
-
return SyncFunctionsClient(url, headers)
|
|
33
|
+
return SyncFunctionsClient(url, headers, verify)
|
{supabase_functions-0.4.5 → supabase_functions-0.4.6}/supabase_functions/_async/functions_client.py
RENAMED
|
@@ -7,13 +7,18 @@ from ..utils import AsyncClient, __version__
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class AsyncFunctionsClient:
|
|
10
|
-
def __init__(self, url: str, headers: Dict):
|
|
10
|
+
def __init__(self, url: str, headers: Dict, verify: bool = True):
|
|
11
11
|
self.url = url
|
|
12
12
|
self.headers = {
|
|
13
13
|
"User-Agent": f"supabase-py/functions-py v{__version__}",
|
|
14
14
|
**headers,
|
|
15
15
|
}
|
|
16
|
-
self._client = AsyncClient(
|
|
16
|
+
self._client = AsyncClient(
|
|
17
|
+
base_url=self.url,
|
|
18
|
+
headers=self.headers,
|
|
19
|
+
verify=bool(verify),
|
|
20
|
+
follow_redirects=True,
|
|
21
|
+
)
|
|
17
22
|
|
|
18
23
|
async def _request(
|
|
19
24
|
self,
|
{supabase_functions-0.4.5 → supabase_functions-0.4.6}/supabase_functions/_sync/functions_client.py
RENAMED
|
@@ -7,13 +7,18 @@ from ..utils import SyncClient, __version__
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class SyncFunctionsClient:
|
|
10
|
-
def __init__(self, url: str, headers: Dict):
|
|
10
|
+
def __init__(self, url: str, headers: Dict, verify: bool = True):
|
|
11
11
|
self.url = url
|
|
12
12
|
self.headers = {
|
|
13
13
|
"User-Agent": f"supabase-py/functions-py v{__version__}",
|
|
14
14
|
**headers,
|
|
15
15
|
}
|
|
16
|
-
self._client = SyncClient(
|
|
16
|
+
self._client = SyncClient(
|
|
17
|
+
base_url=self.url,
|
|
18
|
+
headers=self.headers,
|
|
19
|
+
verify=bool(verify),
|
|
20
|
+
follow_redirects=True,
|
|
21
|
+
)
|
|
17
22
|
|
|
18
23
|
def _request(
|
|
19
24
|
self,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|