sa-token-python-core 0.1.1__tar.gz → 0.1.2__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.
Files changed (64) hide show
  1. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/PKG-INFO +9 -6
  2. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/README.md +7 -4
  3. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/pyproject.toml +2 -2
  4. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/manager.py +1 -1
  5. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/.github/workflows/ci.yml +0 -0
  6. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/.gitignore +0 -0
  7. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/LICENSE +0 -0
  8. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/examples/fastapi/main.py +0 -0
  9. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/examples/flask/main.py +0 -0
  10. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/examples/native/quick_start.py +0 -0
  11. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/__init__.py +0 -0
  12. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/adapter/__init__.py +0 -0
  13. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/adapter/http.py +0 -0
  14. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/adapter/path.py +0 -0
  15. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/adapter/pipeline.py +0 -0
  16. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/config.py +0 -0
  17. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/context.py +0 -0
  18. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/exception.py +0 -0
  19. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/integration/__init__.py +0 -0
  20. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/integration/django.py +0 -0
  21. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/integration/fastapi.py +0 -0
  22. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/integration/fastapi_oauth2.py +0 -0
  23. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/integration/flask.py +0 -0
  24. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/integration/starlette.py +0 -0
  25. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/listener.py +0 -0
  26. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/model.py +0 -0
  27. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/oauth2/__init__.py +0 -0
  28. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/oauth2/model.py +0 -0
  29. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/oauth2/server.py +0 -0
  30. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/online/__init__.py +0 -0
  31. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/permission.py +0 -0
  32. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/py.typed +0 -0
  33. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/security/__init__.py +0 -0
  34. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/security/nonce.py +0 -0
  35. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/security/refresh.py +0 -0
  36. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/security/temp_token.py +0 -0
  37. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/session.py +0 -0
  38. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/sso/__init__.py +0 -0
  39. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/storage/__init__.py +0 -0
  40. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/storage/base.py +0 -0
  41. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/storage/memory.py +0 -0
  42. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/storage/redis.py +0 -0
  43. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/stp_interface.py +0 -0
  44. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/stp_logic.py +0 -0
  45. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/stp_util.py +0 -0
  46. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/strategy/__init__.py +0 -0
  47. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/strategy/base.py +0 -0
  48. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/strategy/builtin.py +0 -0
  49. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/strategy/jwt.py +0 -0
  50. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/sync.py +0 -0
  51. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/src/sa_token/token_io.py +0 -0
  52. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/tests/conftest.py +0 -0
  53. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/tests/test_adapter.py +0 -0
  54. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/tests/test_auth.py +0 -0
  55. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/tests/test_authorization.py +0 -0
  56. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/tests/test_core_isolation.py +0 -0
  57. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/tests/test_extensions.py +0 -0
  58. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/tests/test_integration_fastapi.py +0 -0
  59. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/tests/test_integration_fastapi_oauth2.py +0 -0
  60. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/tests/test_integration_flask.py +0 -0
  61. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/tests/test_optional_backends.py +0 -0
  62. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/tests/test_permission.py +0 -0
  63. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/tests/test_security.py +0 -0
  64. {sa_token_python_core-0.1.1 → sa_token_python_core-0.1.2}/tests/test_storage_and_token.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: sa-token-python-core
3
- Version: 0.1.1
4
- Summary: 有状态 Token 认证与权限鉴权框架(轻量核心)。灵感来源于 Java 的 Sa-Token。全量依赖请安装 sa-token-python
3
+ Version: 0.1.2
4
+ Summary: 有状态 Token 认证与权限鉴权框架(轻量核心)。灵感来源于 Java 的 Sa-Token。常用依赖请安装 sa-token-python;Web 框架按 extras 安装。
5
5
  Project-URL: Homepage, https://github.com/Star-yb/sa-token-python
6
6
  Project-URL: Documentation, https://github.com/Star-yb/sa-token-python
7
7
  Project-URL: Source, https://github.com/Star-yb/sa-token-python
@@ -91,8 +91,11 @@ token = await StpUtil.login(user_id)
91
91
  Python 3.10+。两个发行名,导入均为 `sa_token`。
92
92
 
93
93
  ```bash
94
- pip install sa-token-python # 全量:核心 + Redis / JWT / 全部框架适配
95
- pip install "sa-token-python[full]" # 与上一行相同
94
+ pip install sa-token-python # 核心 + Redis / JWT(不含 Web 框架)
95
+ pip install "sa-token-python[fastapi]" # 再加上 FastAPI / Starlette
96
+ pip install "sa-token-python[flask]" # 再加上 Flask
97
+ pip install "sa-token-python[django]" # 再加上 Django
98
+ pip install "sa-token-python[full]" # Redis / JWT / 全部框架适配
96
99
 
97
100
  pip install sa-token-python-core # 轻量:核心 + 内存存储
98
101
  pip install "sa-token-python-core[redis]" # Redis 存储
@@ -100,7 +103,7 @@ pip install "sa-token-python-core[jwt]" # JWT token 风格
100
103
  pip install "sa-token-python-core[fastapi]" # FastAPI / Starlette
101
104
  pip install "sa-token-python-core[flask]" # Flask
102
105
  pip install "sa-token-python-core[django]" # Django
103
- pip install "sa-token-python-core[full]" # 与 pip install sa-token-python 相同
106
+ pip install "sa-token-python-core[full]" # 与 pip install "sa-token-python[full]" 相同
104
107
  ```
105
108
 
106
109
  也可按需组合 extras,例如 `"sa-token-python-core[redis,jwt,fastapi]"`。
@@ -484,7 +487,7 @@ def delete_order(order_id):
484
487
 
485
488
  Django 自带 `django.contrib.auth`(Session + User 模型)。本库**不是**去替换它,而是给 **纯 API / DRF** 项目提供与 FastAPI、Flask 一致的 Token 鉴权。模板站点继续用 Django Auth 即可。
486
489
 
487
- 安装:`pip install "sa-token-python-core[django]"` 或 `pip install sa-token-python`。Django 是同步 WSGI,一律走 `StpUtilSync`。
490
+ 安装:`pip install "sa-token-python[django]"` 或 `pip install "sa-token-python-core[django]"`。Django 是同步 WSGI,一律走 `StpUtilSync`。
488
491
 
489
492
  ### 1. 启动时初始化
490
493
 
@@ -41,8 +41,11 @@ token = await StpUtil.login(user_id)
41
41
  Python 3.10+。两个发行名,导入均为 `sa_token`。
42
42
 
43
43
  ```bash
44
- pip install sa-token-python # 全量:核心 + Redis / JWT / 全部框架适配
45
- pip install "sa-token-python[full]" # 与上一行相同
44
+ pip install sa-token-python # 核心 + Redis / JWT(不含 Web 框架)
45
+ pip install "sa-token-python[fastapi]" # 再加上 FastAPI / Starlette
46
+ pip install "sa-token-python[flask]" # 再加上 Flask
47
+ pip install "sa-token-python[django]" # 再加上 Django
48
+ pip install "sa-token-python[full]" # Redis / JWT / 全部框架适配
46
49
 
47
50
  pip install sa-token-python-core # 轻量:核心 + 内存存储
48
51
  pip install "sa-token-python-core[redis]" # Redis 存储
@@ -50,7 +53,7 @@ pip install "sa-token-python-core[jwt]" # JWT token 风格
50
53
  pip install "sa-token-python-core[fastapi]" # FastAPI / Starlette
51
54
  pip install "sa-token-python-core[flask]" # Flask
52
55
  pip install "sa-token-python-core[django]" # Django
53
- pip install "sa-token-python-core[full]" # 与 pip install sa-token-python 相同
56
+ pip install "sa-token-python-core[full]" # 与 pip install "sa-token-python[full]" 相同
54
57
  ```
55
58
 
56
59
  也可按需组合 extras,例如 `"sa-token-python-core[redis,jwt,fastapi]"`。
@@ -434,7 +437,7 @@ def delete_order(order_id):
434
437
 
435
438
  Django 自带 `django.contrib.auth`(Session + User 模型)。本库**不是**去替换它,而是给 **纯 API / DRF** 项目提供与 FastAPI、Flask 一致的 Token 鉴权。模板站点继续用 Django Auth 即可。
436
439
 
437
- 安装:`pip install "sa-token-python-core[django]"` 或 `pip install sa-token-python`。Django 是同步 WSGI,一律走 `StpUtilSync`。
440
+ 安装:`pip install "sa-token-python[django]"` 或 `pip install "sa-token-python-core[django]"`。Django 是同步 WSGI,一律走 `StpUtilSync`。
438
441
 
439
442
  ### 1. 启动时初始化
440
443
 
@@ -4,8 +4,8 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sa-token-python-core"
7
- version = "0.1.1"
8
- description = "有状态 Token 认证与权限鉴权框架(轻量核心)。灵感来源于 Java 的 Sa-Token。全量依赖请安装 sa-token-python"
7
+ version = "0.1.2"
8
+ description = "有状态 Token 认证与权限鉴权框架(轻量核心)。灵感来源于 Java 的 Sa-Token。常用依赖请安装 sa-token-python;Web 框架按 extras 安装。"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
11
11
  license = { text = "Apache-2.0" }
@@ -22,7 +22,7 @@ if TYPE_CHECKING: # pragma: no cover - 仅供类型检查
22
22
 
23
23
  __all__ = ["SaTokenManager", "SaTokenBuilder", "SaToken", "__version__"]
24
24
 
25
- __version__ = "0.1.1"
25
+ __version__ = "0.1.2"
26
26
 
27
27
  _BANNER = r"""
28
28
  _____ ______ __