fastlib-py 0.2.9__tar.gz → 0.3.1__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 (76) hide show
  1. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/LICENSE +21 -21
  2. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/PKG-INFO +1 -1
  3. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/__init__.py +0 -2
  4. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/config/loader.py +1 -1
  5. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/config/manager.py +4 -4
  6. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/i18n/messages.py +1 -1
  7. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/middleware/jwt.py +2 -1
  8. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib_py.egg-info/PKG-INFO +1 -1
  9. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/pyproject.toml +127 -127
  10. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/README.md +0 -0
  11. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/cache/__init__.py +0 -0
  12. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/cache/_disk_cache.py +0 -0
  13. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/cache/_redis_cache.py +0 -0
  14. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/cache/base.py +0 -0
  15. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/cache/manager.py +0 -0
  16. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/config/__init__.py +0 -0
  17. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/config/_database_config.py +0 -0
  18. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/config/_security_config.py +0 -0
  19. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/config/_server_config.py +0 -0
  20. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/config/base.py +0 -0
  21. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/config/registry.py +0 -0
  22. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/config/utils.py +0 -0
  23. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/constants.py +0 -0
  24. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/contextvars.py +0 -0
  25. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/db_engine.py +0 -0
  26. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/enums.py +0 -0
  27. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/exception/__init__.py +0 -0
  28. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/exception/base.py +0 -0
  29. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/exception/exception_handler.py +0 -0
  30. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/exception/exception_manager.py +0 -0
  31. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/i18n/__init__.py +0 -0
  32. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/i18n/manager.py +0 -0
  33. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/i18n/types.py +0 -0
  34. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/i18n/utils.py +0 -0
  35. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/logging/__init__.py +0 -0
  36. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/logging/config.py +0 -0
  37. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/logging/handlers.py +0 -0
  38. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/mapper/__init__.py +0 -0
  39. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/mapper/base_mapper.py +0 -0
  40. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/mapper/impl/__init__.py +0 -0
  41. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/mapper/impl/base_mapper_impl.py +0 -0
  42. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/middleware/__init__.py +0 -0
  43. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/middleware/db_session.py +0 -0
  44. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/middleware/i18n.py +0 -0
  45. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/migrate.py +0 -0
  46. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/openapi.py +0 -0
  47. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/py.typed +0 -0
  48. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/request.py +0 -0
  49. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/response.py +0 -0
  50. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/router.py +0 -0
  51. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/schema.py +0 -0
  52. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/security/__init__.py +0 -0
  53. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/security/security.py +0 -0
  54. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/security/utils.py +0 -0
  55. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/service/__init__.py +0 -0
  56. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/service/base_service.py +0 -0
  57. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/service/impl/__init__.py +0 -0
  58. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/service/impl/base_service_impl.py +0 -0
  59. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/stream/__init__.py +0 -0
  60. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/stream/enums.py +0 -0
  61. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/stream/event.py +0 -0
  62. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/stream/handler.py +0 -0
  63. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/stream/schema.py +0 -0
  64. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/stream/sse.py +0 -0
  65. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/utils/__init__.py +0 -0
  66. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/utils/excel_util.py +0 -0
  67. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/utils/file_util.py +0 -0
  68. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/utils/http_util.py +0 -0
  69. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/utils/ip_util.py +0 -0
  70. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/utils/snowflake_util.py +0 -0
  71. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib/utils/str_util.py +0 -0
  72. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib_py.egg-info/SOURCES.txt +0 -0
  73. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib_py.egg-info/dependency_links.txt +0 -0
  74. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib_py.egg-info/requires.txt +0 -0
  75. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/fastlib_py.egg-info/top_level.txt +0 -0
  76. {fastlib_py-0.2.9 → fastlib_py-0.3.1}/setup.cfg +0 -0
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 tyvekzhang
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
+ MIT License
2
+
3
+ Copyright (c) 2025 tyvekzhang
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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastlib-py
3
- Version: 0.2.9
3
+ Version: 0.3.1
4
4
  Summary: Fastlib, high performance, easy to use, fast to code, ready for production
5
5
  Author-email: tyvekZhang <tyvekzhang@gmail.com>
6
6
  Maintainer-email: tyvekZhang <tyvekzhang@gmail.com>
@@ -2,7 +2,6 @@
2
2
  """Fastlib Application Libraries Package."""
3
3
 
4
4
  from .config import ConfigManager as ConfigManager
5
- from .constant import constant as constant
6
5
  from .logging import LogConfig as LogConfig
7
6
  from .logging import Logger as Logger
8
7
  from .openapi import register_offline_openapi as register_offline_openapi
@@ -11,6 +10,5 @@ __all__ = [
11
10
  "ConfigManager",
12
11
  "Logger",
13
12
  "LogConfig",
14
- "constant",
15
13
  "register_offline_openapi",
16
14
  ]
@@ -7,7 +7,7 @@ from typing import Any, Optional
7
7
  import yaml
8
8
  from loguru import logger
9
9
 
10
- from fastlib import constant
10
+ from fastlib import constants as constant
11
11
  from fastlib.config import utils as config_util
12
12
 
13
13
 
@@ -4,14 +4,14 @@
4
4
  import os
5
5
  from typing import Any, Optional
6
6
 
7
- from fastlib import constant
7
+ from fastlib import constants as constant
8
8
  from fastlib.config import utils as config_util
9
- from fastlib.config.base import BaseConfig
10
9
  from fastlib.config._database_config import DatabaseConfig
11
- from fastlib.config.loader import ConfigLoader
12
- from fastlib.config.registry import ConfigRegistry
13
10
  from fastlib.config._security_config import SecurityConfig
14
11
  from fastlib.config._server_config import ServerConfig
12
+ from fastlib.config.base import BaseConfig
13
+ from fastlib.config.loader import ConfigLoader
14
+ from fastlib.config.registry import ConfigRegistry
15
15
 
16
16
 
17
17
  # Decorator for easy registration
@@ -5,7 +5,7 @@ import json
5
5
  from pathlib import Path
6
6
  from typing import Optional, Union
7
7
 
8
- from fastlib.constant import RESOURCE_DIR
8
+ from fastlib.constants import RESOURCE_DIR
9
9
  from fastlib.i18n.types import Language
10
10
 
11
11
  from .manager import get_language
@@ -9,7 +9,8 @@ from jwt.exceptions import PyJWTError
9
9
  from loguru import logger
10
10
  from starlette.responses import JSONResponse
11
11
 
12
- from fastlib import ConfigManager, constant, security
12
+ from fastlib import ConfigManager, security
13
+ from fastlib import constants as constant
13
14
  from fastlib.contextvars import clear_current_user, set_current_user
14
15
  from fastlib.enums import MediaTypeEnum
15
16
  from fastlib.schema import UserCredential
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastlib-py
3
- Version: 0.2.9
3
+ Version: 0.3.1
4
4
  Summary: Fastlib, high performance, easy to use, fast to code, ready for production
5
5
  Author-email: tyvekZhang <tyvekzhang@gmail.com>
6
6
  Maintainer-email: tyvekZhang <tyvekzhang@gmail.com>
@@ -1,127 +1,127 @@
1
- [project]
2
- name = "fastlib-py"
3
- version = "0.2.9"
4
- description = "Fastlib, high performance, easy to use, fast to code, ready for production"
5
- readme = "README.md"
6
- keywords = [
7
- "fastapi",
8
- "library",
9
- "sqlmodel",
10
- "web",
11
- ]
12
- license = "MIT"
13
- maintainers = [
14
- { name = "tyvekZhang", email = "tyvekzhang@gmail.com" },
15
- ]
16
- authors = [
17
- { name = "tyvekZhang", email = "tyvekzhang@gmail.com" },
18
- ]
19
- requires-python = ">=3.9"
20
- classifiers = [
21
- "Development Status :: 4 - Beta",
22
- "Programming Language :: Python",
23
- "Programming Language :: Python :: 3 :: Only",
24
- "Programming Language :: Python :: 3.9",
25
- "Programming Language :: Python :: 3.10",
26
- "Programming Language :: Python :: 3.11",
27
- "Programming Language :: Python :: 3.12",
28
- "Programming Language :: Python :: 3.13",
29
- "Programming Language :: Python :: Implementation :: CPython",
30
- "Programming Language :: Python :: Implementation :: PyPy",
31
- ]
32
- dependencies = [
33
- "aiosqlite>=0.21",
34
- "alembic>=1.15.2",
35
- "asgi-correlation-id>=4.3.4",
36
- "cryptography>=45.0.6",
37
- "diskcache>=5.6.3",
38
- "fastapi[standard]>=0.115.12",
39
- "loguru>=0.7.3",
40
- "openpyxl>=3.1.5",
41
- "pandas>=2.2.3",
42
- "passlib[bcrypt]>=1.7.4",
43
- "pyjwt>=2.10.1",
44
- "sqlmodel>=0.0.24",
45
- ]
46
-
47
- urls.Homepage = "https://github.com/tyvekzhang/fastlib"
48
-
49
- [dependency-groups]
50
- dev = [
51
- "coverage>=7.8",
52
- "httpx>=0.28.1",
53
- "pre-commit>=4.2",
54
- "pytest>=8.3.5",
55
- "pytest-asyncio>=1.1",
56
- ]
57
-
58
- docs = [
59
- "sphinx>=7.2.6",
60
- "sphinx-rtd-theme>=2",
61
- ]
62
-
63
- [tool.ruff]
64
- line-length = 88
65
-
66
- include = [ "fastlib/**/*.py", "main.py" ]
67
- exclude = [ "doc/**/*.py" ]
68
-
69
- lint.select = [
70
- "B", # flake8-bugbear
71
- "C4", # flake8-comprehensions
72
- "E", # pycodestyle errors
73
- "F", # pyflakes
74
- "I", # isort
75
- "UP", # pyupgrade
76
- "W", # pycodestyle warnings
77
- ]
78
- lint.ignore = [
79
- "B008", # do not perform function calls in argument defaults
80
- "C901", # too complex
81
- "E501", # line too long, handled by black
82
- "W191", # indentation contains tabs
83
- ]
84
- lint.isort.known-third-party = [
85
- "aiosqlite",
86
- "alembic",
87
- "diskcache",
88
- "fastapi",
89
- "loguru",
90
- "openpyxl",
91
- "pandas",
92
- "passlib",
93
- "pyjwt",
94
- "sqlmodel",
95
- "starlette",
96
- "pydantic",
97
- "bcrypt",
98
- "cryptography",
99
- ]
100
- # Preserve types, even if a file imports `from __future__ import annotations`.
101
- lint.pyupgrade.keep-runtime-typing = true
102
-
103
- [tool.coverage.run]
104
- data_file = "coverage/.coverage"
105
- source = [ "fastlib" ]
106
- context = '${CONTEXT}'
107
- dynamic_context = "test_function"
108
- omit = [
109
- ]
110
-
111
- [tool.coverage.report]
112
- fail_under = 90
113
- show_missing = true
114
- sort = "-Cover"
115
-
116
- [tool.coverage.html]
117
- show_contexts = true
118
- directory = "coverage/html"
119
- title = "FastLib Coverage Report"
120
-
121
- [tool.mypy]
122
- strict = true
123
-
124
- [[tool.uv.index]]
125
- name = "tsinghua"
126
- url = "https://pypi.tuna.tsinghua.edu.cn/simple/"
127
- default = true
1
+ [project]
2
+ name = "fastlib-py"
3
+ version = "0.3.1"
4
+ description = "Fastlib, high performance, easy to use, fast to code, ready for production"
5
+ readme = "README.md"
6
+ keywords = [
7
+ "fastapi",
8
+ "library",
9
+ "sqlmodel",
10
+ "web",
11
+ ]
12
+ license = "MIT"
13
+ maintainers = [
14
+ { name = "tyvekZhang", email = "tyvekzhang@gmail.com" },
15
+ ]
16
+ authors = [
17
+ { name = "tyvekZhang", email = "tyvekzhang@gmail.com" },
18
+ ]
19
+ requires-python = ">=3.9"
20
+ classifiers = [
21
+ "Development Status :: 4 - Beta",
22
+ "Programming Language :: Python",
23
+ "Programming Language :: Python :: 3 :: Only",
24
+ "Programming Language :: Python :: 3.9",
25
+ "Programming Language :: Python :: 3.10",
26
+ "Programming Language :: Python :: 3.11",
27
+ "Programming Language :: Python :: 3.12",
28
+ "Programming Language :: Python :: 3.13",
29
+ "Programming Language :: Python :: Implementation :: CPython",
30
+ "Programming Language :: Python :: Implementation :: PyPy",
31
+ ]
32
+ dependencies = [
33
+ "aiosqlite>=0.21",
34
+ "alembic>=1.15.2",
35
+ "asgi-correlation-id>=4.3.4",
36
+ "cryptography>=45.0.6",
37
+ "diskcache>=5.6.3",
38
+ "fastapi[standard]>=0.115.12",
39
+ "loguru>=0.7.3",
40
+ "openpyxl>=3.1.5",
41
+ "pandas>=2.2.3",
42
+ "passlib[bcrypt]>=1.7.4",
43
+ "pyjwt>=2.10.1",
44
+ "sqlmodel>=0.0.24",
45
+ ]
46
+
47
+ urls.Homepage = "https://github.com/tyvekzhang/fastlib"
48
+
49
+ [dependency-groups]
50
+ dev = [
51
+ "coverage>=7.8",
52
+ "httpx>=0.28.1",
53
+ "pre-commit>=4.2",
54
+ "pytest>=8.3.5",
55
+ "pytest-asyncio>=1.1",
56
+ ]
57
+
58
+ docs = [
59
+ "sphinx>=7.2.6",
60
+ "sphinx-rtd-theme>=2",
61
+ ]
62
+
63
+ [tool.ruff]
64
+ line-length = 88
65
+
66
+ include = [ "fastlib/**/*.py", "main.py" ]
67
+ exclude = [ "doc/**/*.py" ]
68
+
69
+ lint.select = [
70
+ "B", # flake8-bugbear
71
+ "C4", # flake8-comprehensions
72
+ "E", # pycodestyle errors
73
+ "F", # pyflakes
74
+ "I", # isort
75
+ "UP", # pyupgrade
76
+ "W", # pycodestyle warnings
77
+ ]
78
+ lint.ignore = [
79
+ "B008", # do not perform function calls in argument defaults
80
+ "C901", # too complex
81
+ "E501", # line too long, handled by black
82
+ "W191", # indentation contains tabs
83
+ ]
84
+ lint.isort.known-third-party = [
85
+ "aiosqlite",
86
+ "alembic",
87
+ "diskcache",
88
+ "fastapi",
89
+ "loguru",
90
+ "openpyxl",
91
+ "pandas",
92
+ "passlib",
93
+ "pyjwt",
94
+ "sqlmodel",
95
+ "starlette",
96
+ "pydantic",
97
+ "bcrypt",
98
+ "cryptography",
99
+ ]
100
+ # Preserve types, even if a file imports `from __future__ import annotations`.
101
+ lint.pyupgrade.keep-runtime-typing = true
102
+
103
+ [tool.coverage.run]
104
+ data_file = "coverage/.coverage"
105
+ source = [ "fastlib" ]
106
+ context = '${CONTEXT}'
107
+ dynamic_context = "test_function"
108
+ omit = [
109
+ ]
110
+
111
+ [tool.coverage.report]
112
+ fail_under = 90
113
+ show_missing = true
114
+ sort = "-Cover"
115
+
116
+ [tool.coverage.html]
117
+ show_contexts = true
118
+ directory = "coverage/html"
119
+ title = "FastLib Coverage Report"
120
+
121
+ [tool.mypy]
122
+ strict = true
123
+
124
+ [[tool.uv.index]]
125
+ name = "tsinghua"
126
+ url = "https://pypi.tuna.tsinghua.edu.cn/simple/"
127
+ default = true
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes