supabase_functions 0.5.1__tar.gz → 0.6.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
  MIT License
2
2
 
3
- Copyright (c) 2022 Joel Lee
3
+ Copyright (c) 2020 Supabase
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: supabase_functions
3
- Version: 0.5.1
3
+ Version: 0.6.0
4
4
  Summary: Library for Supabase Functions
5
- Home-page: https://github.com/supabase-community/functions-py
5
+ Home-page: https://github.com/supabase/functions-py
6
6
  License: MIT
7
7
  Author: Joel Lee
8
8
  Author-email: joel@joellee.org
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
17
  Requires-Dist: httpx[http2] (>=0.24,<0.28)
18
- Project-URL: Repository, https://github.com/supabase-community/functions-py
18
+ Project-URL: Repository, https://github.com/supabase/functions-py
19
19
  Description-Content-Type: text/markdown
20
20
 
21
21
  # Functions-py
@@ -0,0 +1,33 @@
1
+ [tool.poetry]
2
+ name = "supabase_functions"
3
+ version = "0.6.0" # {x-release-please-version}
4
+ description = "Library for Supabase Functions"
5
+ authors = [
6
+ "Joel Lee <joel@joellee.org>",
7
+ "Andrew Smith <a.smith@silentworks.co.uk>"
8
+ ]
9
+ license = "MIT"
10
+ readme = "README.md"
11
+ repository = "https://github.com/supabase/functions-py"
12
+
13
+ [tool.poetry.dependencies]
14
+ python = "^3.8"
15
+ httpx = {version = ">=0.24,<0.28", extras = ["http2"]}
16
+
17
+ [tool.poetry.group.dev.dependencies]
18
+ black = ">=23.9.1,<25.0.0"
19
+ isort = "^5.12.0"
20
+ pre-commit = "^3.4.0"
21
+ pyjwt = "^2.8.0"
22
+ pytest = ">=7.4.2,<9.0.0"
23
+ pytest-cov = ">=4,<6"
24
+ unasync-cli = "^0.0.9"
25
+ pytest-asyncio = ">=0.21.1,<0.25.0"
26
+ respx = ">=0.20.2,<0.22.0"
27
+
28
+ [tool.pytest.ini_options]
29
+ asyncio_mode = "auto"
30
+
31
+ [build-system]
32
+ requires = ["poetry-core>=1.0.0"]
33
+ build-backend = "poetry.core.masonry.api"
@@ -3,11 +3,19 @@ from typing import Any, Dict, Literal, Optional, Union
3
3
  from httpx import HTTPError, Response
4
4
 
5
5
  from ..errors import FunctionsHttpError, FunctionsRelayError
6
- from ..utils import AsyncClient, __version__
6
+ from ..utils import AsyncClient
7
+ from ..version import __version__
7
8
 
8
9
 
9
10
  class AsyncFunctionsClient:
10
- def __init__(self, url: str, headers: Dict, timeout: int, verify: bool = True):
11
+ def __init__(
12
+ self,
13
+ url: str,
14
+ headers: Dict,
15
+ timeout: int,
16
+ verify: bool = True,
17
+ proxy: Optional[str] = None,
18
+ ):
11
19
  self.url = url
12
20
  self.headers = {
13
21
  "User-Agent": f"supabase-py/functions-py v{__version__}",
@@ -18,6 +26,7 @@ class AsyncFunctionsClient:
18
26
  headers=self.headers,
19
27
  verify=bool(verify),
20
28
  timeout=timeout,
29
+ proxy=proxy,
21
30
  follow_redirects=True,
22
31
  http2=True,
23
32
  )
@@ -3,11 +3,19 @@ from typing import Any, Dict, Literal, Optional, Union
3
3
  from httpx import HTTPError, Response
4
4
 
5
5
  from ..errors import FunctionsHttpError, FunctionsRelayError
6
- from ..utils import SyncClient, __version__
6
+ from ..utils import SyncClient
7
+ from ..version import __version__
7
8
 
8
9
 
9
10
  class SyncFunctionsClient:
10
- def __init__(self, url: str, headers: Dict, timeout: int, verify: bool = True):
11
+ def __init__(
12
+ self,
13
+ url: str,
14
+ headers: Dict,
15
+ timeout: int,
16
+ verify: bool = True,
17
+ proxy: Optional[str] = None,
18
+ ):
11
19
  self.url = url
12
20
  self.headers = {
13
21
  "User-Agent": f"supabase-py/functions-py v{__version__}",
@@ -18,6 +26,7 @@ class SyncFunctionsClient:
18
26
  headers=self.headers,
19
27
  verify=bool(verify),
20
28
  timeout=timeout,
29
+ proxy=proxy,
21
30
  follow_redirects=True,
22
31
  http2=True,
23
32
  )
@@ -1,8 +1,6 @@
1
1
  from httpx import AsyncClient as AsyncClient # noqa: F401
2
2
  from httpx import Client as BaseClient
3
3
 
4
- __version__ = "0.5.1"
5
-
6
4
  DEFAULT_FUNCTION_CLIENT_TIMEOUT = 5
7
5
 
8
6
 
@@ -0,0 +1 @@
1
+ __version__ = "0.6.0" # {x-release-please-version}
@@ -1,44 +0,0 @@
1
- [tool.poetry]
2
- name = "supabase_functions"
3
- version = "0.5.1"
4
- description = "Library for Supabase Functions"
5
- authors = [
6
- "Joel Lee <joel@joellee.org>",
7
- "Andrew Smith <a.smith@silentworks.co.uk>"
8
- ]
9
- license = "MIT"
10
- readme = "README.md"
11
- repository = "https://github.com/supabase-community/functions-py"
12
-
13
- [tool.poetry.dependencies]
14
- python = "^3.8"
15
- httpx = {version = ">=0.24,<0.28", extras = ["http2"]}
16
-
17
- [tool.poetry.group.dev.dependencies]
18
- python-semantic-release = ">=8.1.1,<10.0.0"
19
- black = ">=23.9.1,<25.0.0"
20
- isort = "^5.12.0"
21
- pre-commit = "^3.4.0"
22
- pyjwt = "^2.8.0"
23
- pytest = ">=7.4.2,<9.0.0"
24
- pytest-cov = ">=4,<6"
25
- unasync-cli = "^0.0.9"
26
- pytest-asyncio = ">=0.21.1,<0.24.0"
27
- respx = ">=0.20.2,<0.22.0"
28
-
29
- [tool.semantic_release]
30
- version_variables = ["supabase_functions/utils.py:__version__"]
31
- version_toml = ["pyproject.toml:tool.poetry.version"]
32
- major_on_zero = false
33
- commit_message = "chore(release): bump version to v{version}"
34
- build_command = "curl -sSL https://install.python-poetry.org | python - && export PATH=\"/github/home/.local/bin:$PATH\" && poetry install && poetry build"
35
- upload_to_vcs_release = true
36
- branch = "main"
37
- changelog_components = "semantic_release.changelog.changelog_headers,semantic_release.changelog.compare_url"
38
-
39
- [tool.pytest.ini_options]
40
- asyncio_mode = "auto"
41
-
42
- [build-system]
43
- requires = ["poetry-core>=1.0.0"]
44
- build-backend = "poetry.core.masonry.api"