supabase_auth 2.12.2__tar.gz → 2.19.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.
- {supabase_auth-2.12.2 → supabase_auth-2.19.0}/PKG-INFO +27 -26
- {supabase_auth-2.12.2 → supabase_auth-2.19.0}/README.md +12 -6
- supabase_auth-2.19.0/pyproject.toml +77 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/__init__.py +8 -4
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/_async/gotrue_client.py +5 -1
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/_sync/gotrue_client.py +5 -1
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/types.py +5 -0
- supabase_auth-2.19.0/src/supabase_auth/version.py +1 -0
- supabase_auth-2.12.2/LICENSE +0 -21
- supabase_auth-2.12.2/pyproject.toml +0 -42
- supabase_auth-2.12.2/supabase_auth/version.py +0 -1
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/_async/__init__.py +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/_async/gotrue_admin_api.py +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/_async/gotrue_admin_mfa_api.py +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/_async/gotrue_base_api.py +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/_async/gotrue_mfa_api.py +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/_async/storage.py +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/_sync/__init__.py +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/_sync/gotrue_admin_api.py +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/_sync/gotrue_admin_mfa_api.py +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/_sync/gotrue_base_api.py +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/_sync/gotrue_mfa_api.py +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/_sync/storage.py +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/constants.py +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/errors.py +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/helpers.py +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/http_clients.py +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/py.typed +0 -0
- {supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/timer.py +0 -0
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
2
|
-
Name:
|
|
3
|
-
Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: supabase-auth
|
|
3
|
+
Version: 2.19.0
|
|
4
4
|
Summary: Python Client Library for Supabase Auth
|
|
5
|
-
Home-page: https://github.com/supabase/auth-py
|
|
6
|
-
License: MIT
|
|
7
5
|
Author: Joel Lee
|
|
8
|
-
Author-email: joel@joellee.org
|
|
9
|
-
|
|
6
|
+
Author-email: Joel Lee <joel@joellee.org>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
10
|
Classifier: Operating System :: OS Independent
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Requires-Dist: pytest-mock (>=3.14.0,<4.0.0)
|
|
22
|
-
Project-URL: Documentation, https://github.com/supabase/auth-py
|
|
23
|
-
Project-URL: Repository, https://github.com/supabase/auth-py
|
|
11
|
+
Requires-Dist: httpx[http2]>=0.26,<0.29
|
|
12
|
+
Requires-Dist: pydantic>=1.10,<3
|
|
13
|
+
Requires-Dist: pyjwt[crypto]>=2.10.1
|
|
14
|
+
Maintainer: Leonardo Santiago
|
|
15
|
+
Maintainer-email: Leonardo Santiago <leonardo.santiago@supabase.io>
|
|
16
|
+
Requires-Python: >=3.9
|
|
17
|
+
Project-URL: documentation, https://github.com/supabase/supabase-py/tree/main/src/auth
|
|
18
|
+
Project-URL: homepage, https://github.com/supabase/supabase-py/tree/main/src/auth
|
|
19
|
+
Project-URL: repository, https://github.com/supabase/supabase-py
|
|
24
20
|
Description-Content-Type: text/markdown
|
|
25
21
|
|
|
26
22
|
# Auth-py
|
|
@@ -28,24 +24,30 @@ Description-Content-Type: text/markdown
|
|
|
28
24
|
[](https://github.com/supabase-community/gotrue-py/actions/workflows/ci.yml)
|
|
29
25
|
[](https://pypi.org/project/gotrue)
|
|
30
26
|
[](https://pypi.org/project/gotrue)
|
|
31
|
-
[](https://coveralls.io/github/supabase/auth-py?branch=main)
|
|
32
27
|
|
|
33
28
|
This is a Python port of the [supabase js gotrue client](https://github.com/supabase/gotrue-js). The current state is that there is a features parity but with small differences that are mentioned in the section **Differences to the JS client**. As of December 14th, we renamed to repo from `gotrue-py` to `auth-py` to mirror the changes in the JavaScript library.
|
|
34
29
|
|
|
35
30
|
## Installation
|
|
36
31
|
|
|
37
|
-
The package can be installed using pip or poetry:
|
|
32
|
+
The package can be installed using pip, uv or poetry:
|
|
38
33
|
|
|
39
|
-
###
|
|
34
|
+
### Pip
|
|
40
35
|
|
|
41
36
|
```bash
|
|
42
|
-
|
|
37
|
+
pip install supabase_auth
|
|
43
38
|
```
|
|
44
39
|
|
|
45
|
-
|
|
40
|
+
|
|
41
|
+
### Uv
|
|
46
42
|
|
|
47
43
|
```bash
|
|
48
|
-
|
|
44
|
+
uv add supabase_auth
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Poetry
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
poetry add supabase_auth
|
|
49
51
|
```
|
|
50
52
|
|
|
51
53
|
## Features
|
|
@@ -182,4 +184,3 @@ client.mfa.unenroll({"factor_id": "factor_id"})
|
|
|
182
184
|
## Contributions
|
|
183
185
|
|
|
184
186
|
We would be immensely grateful for any contributions to this project.
|
|
185
|
-
|
|
@@ -3,24 +3,30 @@
|
|
|
3
3
|
[](https://github.com/supabase-community/gotrue-py/actions/workflows/ci.yml)
|
|
4
4
|
[](https://pypi.org/project/gotrue)
|
|
5
5
|
[](https://pypi.org/project/gotrue)
|
|
6
|
-
[](https://coveralls.io/github/supabase/auth-py?branch=main)
|
|
7
6
|
|
|
8
7
|
This is a Python port of the [supabase js gotrue client](https://github.com/supabase/gotrue-js). The current state is that there is a features parity but with small differences that are mentioned in the section **Differences to the JS client**. As of December 14th, we renamed to repo from `gotrue-py` to `auth-py` to mirror the changes in the JavaScript library.
|
|
9
8
|
|
|
10
9
|
## Installation
|
|
11
10
|
|
|
12
|
-
The package can be installed using pip or poetry:
|
|
11
|
+
The package can be installed using pip, uv or poetry:
|
|
13
12
|
|
|
14
|
-
###
|
|
13
|
+
### Pip
|
|
15
14
|
|
|
16
15
|
```bash
|
|
17
|
-
|
|
16
|
+
pip install supabase_auth
|
|
18
17
|
```
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
|
|
20
|
+
### Uv
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
|
|
23
|
+
uv add supabase_auth
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Poetry
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
poetry add supabase_auth
|
|
24
30
|
```
|
|
25
31
|
|
|
26
32
|
## Features
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "supabase_auth"
|
|
3
|
+
version = "2.19.0" # {x-release-please-version}
|
|
4
|
+
description = "Python Client Library for Supabase Auth"
|
|
5
|
+
authors = [
|
|
6
|
+
{name = "Joel Lee", email = "joel@joellee.org" }
|
|
7
|
+
]
|
|
8
|
+
maintainers = [
|
|
9
|
+
{ name = "Leonardo Santiago", email = "leonardo.santiago@supabase.io" }
|
|
10
|
+
]
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
license = "MIT"
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"License :: OSI Approved :: MIT License",
|
|
16
|
+
"Operating System :: OS Independent",
|
|
17
|
+
]
|
|
18
|
+
requires-python = ">=3.9"
|
|
19
|
+
dependencies = [
|
|
20
|
+
"httpx[http2] >=0.26,<0.29",
|
|
21
|
+
"pydantic >=1.10,<3",
|
|
22
|
+
"pyjwt[crypto] >=2.10.1",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.urls]
|
|
26
|
+
homepage = "https://github.com/supabase/supabase-py/tree/main/src/auth"
|
|
27
|
+
repository = "https://github.com/supabase/supabase-py"
|
|
28
|
+
documentation = "https://github.com/supabase/supabase-py/tree/main/src/auth"
|
|
29
|
+
|
|
30
|
+
# [project.scripts]
|
|
31
|
+
# gh-download = "scripts.gh-download:main"
|
|
32
|
+
|
|
33
|
+
[dependency-groups]
|
|
34
|
+
tests = [
|
|
35
|
+
"Faker >= 37.4.0",
|
|
36
|
+
"respx >=0.20.2,<0.23.0",
|
|
37
|
+
"pytest >= 8.4.1",
|
|
38
|
+
"pytest-mock >= 3.14.0",
|
|
39
|
+
"pytest-cov >= 6.2.1",
|
|
40
|
+
"pytest-depends >= 1.0.1",
|
|
41
|
+
"pytest-asyncio >= 1.0.0",
|
|
42
|
+
]
|
|
43
|
+
lints = [
|
|
44
|
+
"ruff >=0.12.1",
|
|
45
|
+
"unasync >= 0.6.0",
|
|
46
|
+
]
|
|
47
|
+
dev = [{ include-group = "lints" }, {include-group = "tests" }]
|
|
48
|
+
|
|
49
|
+
[tool.ruff.lint]
|
|
50
|
+
select = [
|
|
51
|
+
# pycodestyle
|
|
52
|
+
"E",
|
|
53
|
+
# Pyflakes
|
|
54
|
+
"F",
|
|
55
|
+
# pyupgrade
|
|
56
|
+
"UP",
|
|
57
|
+
# flake8-bugbear
|
|
58
|
+
# "B",
|
|
59
|
+
# flake8-simplify
|
|
60
|
+
# "SIM",
|
|
61
|
+
# isort
|
|
62
|
+
"I",
|
|
63
|
+
]
|
|
64
|
+
ignore = ["F401", "F403", "F841", "E712", "E501", "E402", "E722", "E731", "UP006", "UP035"]
|
|
65
|
+
# isort.required-imports = ["from __future__ import annotations"]
|
|
66
|
+
|
|
67
|
+
[tool.ruff.lint.pyupgrade]
|
|
68
|
+
# Preserve types, even if a file imports `from __future__ import annotations`.
|
|
69
|
+
keep-runtime-typing = true
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
[tool.pytest.ini_options]
|
|
73
|
+
asyncio_mode = "auto"
|
|
74
|
+
|
|
75
|
+
[build-system]
|
|
76
|
+
requires = ["uv_build>=0.8.3,<0.9.0"]
|
|
77
|
+
build-backend = "uv_build"
|
|
@@ -2,11 +2,15 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from ._async.gotrue_admin_api import AsyncGoTrueAdminAPI # type: ignore # noqa: F401
|
|
4
4
|
from ._async.gotrue_client import AsyncGoTrueClient # type: ignore # noqa: F401
|
|
5
|
-
from ._async.storage import
|
|
6
|
-
|
|
5
|
+
from ._async.storage import (
|
|
6
|
+
AsyncMemoryStorage, # type: ignore # noqa: F401
|
|
7
|
+
AsyncSupportedStorage, # type: ignore # noqa: F401
|
|
8
|
+
)
|
|
7
9
|
from ._sync.gotrue_admin_api import SyncGoTrueAdminAPI # type: ignore # noqa: F401
|
|
8
10
|
from ._sync.gotrue_client import SyncGoTrueClient # type: ignore # noqa: F401
|
|
9
|
-
from ._sync.storage import
|
|
10
|
-
|
|
11
|
+
from ._sync.storage import (
|
|
12
|
+
SyncMemoryStorage, # type: ignore # noqa: F401
|
|
13
|
+
SyncSupportedStorage, # type: ignore # noqa: F401
|
|
14
|
+
)
|
|
11
15
|
from .types import * # type: ignore # noqa: F401, F403
|
|
12
16
|
from .version import __version__
|
|
@@ -79,6 +79,7 @@ from ..types import (
|
|
|
79
79
|
SignOutOptions,
|
|
80
80
|
SignUpWithPasswordCredentials,
|
|
81
81
|
Subscription,
|
|
82
|
+
UpdateUserOptions,
|
|
82
83
|
UserAttributes,
|
|
83
84
|
UserIdentity,
|
|
84
85
|
UserResponse,
|
|
@@ -647,7 +648,9 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
647
648
|
return None
|
|
648
649
|
return await self._request("GET", "user", jwt=jwt, xform=parse_user_response)
|
|
649
650
|
|
|
650
|
-
async def update_user(
|
|
651
|
+
async def update_user(
|
|
652
|
+
self, attributes: UserAttributes, options: UpdateUserOptions = {}
|
|
653
|
+
) -> UserResponse:
|
|
651
654
|
"""
|
|
652
655
|
Updates user data, if there is a logged in user.
|
|
653
656
|
"""
|
|
@@ -658,6 +661,7 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
658
661
|
"PUT",
|
|
659
662
|
"user",
|
|
660
663
|
body=attributes,
|
|
664
|
+
redirect_to=options.get("email_redirect_to"),
|
|
661
665
|
jwt=session.access_token,
|
|
662
666
|
xform=parse_user_response,
|
|
663
667
|
)
|
|
@@ -79,6 +79,7 @@ from ..types import (
|
|
|
79
79
|
SignOutOptions,
|
|
80
80
|
SignUpWithPasswordCredentials,
|
|
81
81
|
Subscription,
|
|
82
|
+
UpdateUserOptions,
|
|
82
83
|
UserAttributes,
|
|
83
84
|
UserIdentity,
|
|
84
85
|
UserResponse,
|
|
@@ -645,7 +646,9 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
645
646
|
return None
|
|
646
647
|
return self._request("GET", "user", jwt=jwt, xform=parse_user_response)
|
|
647
648
|
|
|
648
|
-
def update_user(
|
|
649
|
+
def update_user(
|
|
650
|
+
self, attributes: UserAttributes, options: UpdateUserOptions = {}
|
|
651
|
+
) -> UserResponse:
|
|
649
652
|
"""
|
|
650
653
|
Updates user data, if there is a logged in user.
|
|
651
654
|
"""
|
|
@@ -656,6 +659,7 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
656
659
|
"PUT",
|
|
657
660
|
"user",
|
|
658
661
|
body=attributes,
|
|
662
|
+
redirect_to=options.get("email_redirect_to"),
|
|
659
663
|
jwt=session.access_token,
|
|
660
664
|
xform=parse_user_response,
|
|
661
665
|
)
|
|
@@ -87,6 +87,10 @@ class Options(TypedDict):
|
|
|
87
87
|
captcha_token: NotRequired[str]
|
|
88
88
|
|
|
89
89
|
|
|
90
|
+
class UpdateUserOptions(TypedDict):
|
|
91
|
+
email_redirect_to: NotRequired[str]
|
|
92
|
+
|
|
93
|
+
|
|
90
94
|
class InviteUserByEmailOptions(TypedDict):
|
|
91
95
|
redirect_to: NotRequired[str]
|
|
92
96
|
data: NotRequired[Any]
|
|
@@ -229,6 +233,7 @@ class UserAttributes(TypedDict):
|
|
|
229
233
|
phone: NotRequired[str]
|
|
230
234
|
password: NotRequired[str]
|
|
231
235
|
data: NotRequired[Any]
|
|
236
|
+
nonce: NotRequired[str]
|
|
232
237
|
|
|
233
238
|
|
|
234
239
|
class AdminUserAttributes(UserAttributes, TypedDict):
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.19.0" # {x-release-please-version}
|
supabase_auth-2.12.2/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 Supabase
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
[tool.poetry]
|
|
2
|
-
name = "supabase_auth"
|
|
3
|
-
version = "2.12.2" # {x-release-please-version}
|
|
4
|
-
description = "Python Client Library for Supabase Auth"
|
|
5
|
-
authors = ["Joel Lee <joel@joellee.org>"]
|
|
6
|
-
homepage = "https://github.com/supabase/auth-py"
|
|
7
|
-
repository = "https://github.com/supabase/auth-py"
|
|
8
|
-
documentation = "https://github.com/supabase/auth-py"
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
license = "MIT"
|
|
11
|
-
classifiers = [
|
|
12
|
-
"Programming Language :: Python :: 3",
|
|
13
|
-
"License :: OSI Approved :: MIT License",
|
|
14
|
-
"Operating System :: OS Independent",
|
|
15
|
-
]
|
|
16
|
-
|
|
17
|
-
[tool.poetry.dependencies]
|
|
18
|
-
python = "^3.9"
|
|
19
|
-
httpx = { version = ">=0.26,<0.29", extras = ["http2"] }
|
|
20
|
-
pydantic = ">=1.10,<3"
|
|
21
|
-
pyjwt = "^2.10.1"
|
|
22
|
-
pytest-mock = "^3.14.0"
|
|
23
|
-
|
|
24
|
-
[tool.poetry.dev-dependencies]
|
|
25
|
-
pytest = "^8.4.1"
|
|
26
|
-
flake8 = "^7.3.0"
|
|
27
|
-
black = "^25.1.0"
|
|
28
|
-
isort = "^6.0.1"
|
|
29
|
-
pre-commit = "^4.2.0"
|
|
30
|
-
pytest-cov = "^6.2.1"
|
|
31
|
-
pytest-depends = "^1.0.1"
|
|
32
|
-
pytest-asyncio = "^1.0.0"
|
|
33
|
-
Faker = "^37.4.0"
|
|
34
|
-
unasync-cli = { git = "https://github.com/supabase-community/unasync-cli.git", branch = "main" }
|
|
35
|
-
|
|
36
|
-
[tool.poetry.group.dev.dependencies]
|
|
37
|
-
pygithub = ">=1.57,<3.0"
|
|
38
|
-
respx = ">=0.20.2,<0.23.0"
|
|
39
|
-
|
|
40
|
-
[build-system]
|
|
41
|
-
requires = ["poetry-core>=1.0.0"]
|
|
42
|
-
build-backend = "poetry.core.masonry.api"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.12.2" # {x-release-please-version}
|
|
File without changes
|
|
File without changes
|
{supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/_async/gotrue_admin_mfa_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{supabase_auth-2.12.2 → supabase_auth-2.19.0/src}/supabase_auth/_sync/gotrue_admin_mfa_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|