forked from yezz123/authx
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
181 lines (158 loc) · 4.56 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
[build-system]
requires = ["hatchling", "hatch-fancy-pypi-readme>=22.5.0"]
build-backend = "hatchling.build"
[project]
name = "authx"
description = "Ready to use and customizable Authentications and Oauth2 management for FastAPI"
readme = "README.md"
requires-python = ">=3.8"
license = "MIT"
authors = [
{ name = "Yasser Tahiri", email = "[email protected]" },
]
keywords = [
"FastAPI",
"Authentication",
"Oauth2",
"Pydantic",
"JWT",
"Cookie"
]
classifiers = [
"License :: OSI Approved :: MIT License",
# Update the following list as the project matures
"Development Status :: 4 - Beta",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Framework :: FastAPI",
"Framework :: AsyncIO",
"Framework :: Pydantic",
"Framework :: Pydantic :: 2",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Internet :: WWW/HTTP :: Session",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet",
"Typing :: Typed",
]
dependencies = [
"fastapi >=0.111.0",
"pyjwt[crypto] >=2.6.0,<3.0.0",
"pydantic >=1.7.4,!=1.8,!=1.8.1,<3.0.0",
"pydantic-settings >=2.1.0",
"python-dateutil>=2.8,<3.0.0",
"pytz>=2023.3,<2025.0",
"python-jose>=3.3.0,<4.0.0",
]
dynamic = ["version"]
[tool.hatch.metadata]
allow-direct-references = true
[project.urls]
Homepage = "https://github.com/yezz123/authx"
Documentation = "https://authx.yezz.me/"
Funding = 'https://github.com/sponsors/yezz123'
Source = 'https://github.com/yezz123/authx'
Changelog = 'https://authx.yezz.me/release/'
[tool.hatch.version]
path = "authx/__init__.py"
[tool.hatch.build.targets.sdist]
# limit which files are included in the sdist (.tar.gz) asset,
# to exclude unnecessary files and directories from the distribution
include = [
'/README.md',
'/docs/release.md',
'/scripts',
'/authx',
'/tests',
'/requirements',
]
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = 'text/markdown'
# construct the PyPI readme from README.md and HISTORY.md
fragments = [
{path = "README.md"},
{text = "\n## Changelog\n\n"},
{path = "docs/release.md", pattern = "(.+?)<!-- package description limit -->"},
{text = "\n... see [here](https://authx.yezz.me/release/#100b0) for earlier changes.\n"},
]
# convert GitHuB issue/PR numbers and handles to links
substitutions = [
{pattern = '(\s+)#(\d+)', replacement = '\1[#\2](https://github.com/yezz123/authx/issues/\2)'},
{pattern = '(\s+)@([\w\-]+)', replacement = '\1[@\2](https://github.com/\2)'},
{pattern = '@@', replacement = '@'},
]
[tool.ruff.lint]
mccabe = { max-complexity = 14 }
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
]
ignore = [
"E501", # line too long, handled by black
"B018", # Found useless expression.
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"authx/token.py" = ["C901"]
"authx/main.py" = ["B008"]
"tests/utils.py" = ["B008"]
"tests/test_callback.py" = ["E712"]
[tool.ruff.lint.isort]
known-third-party = ["pydantic", "typing_extensions", "sqlalchemy"]
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true
[tool.coverage.run]
source = ["authx"]
branch = true
context = '${CONTEXT}'
[tool.coverage.paths]
source = [
'authx/',
'/Users/runner/work/authx/authx/authx/',
'D:\a\authx\authx\authx',
]
[tool.coverage.report]
precision = 2
fail_under = 94
exclude_lines = [
'pragma: no cover',
'raise NotImplementedError',
'if TYPE_CHECKING:',
'@overload',
'if CASUAL_UT',
]
[tool.mypy]
strict = true
warn_return_any = false
no_implicit_optional = false
[[tool.mypy.overrides]]
module = "authx._internal._callback"
ignore_errors = true
[[tool.mypy.overrides]]
module = "authx.config"
ignore_errors = true
[tool.pytest.ini_options]
testpaths = 'tests'
log_cli = "1"
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
log_cli_date_format= "%Y-%m-%d %H:%M:%S"
asyncio_mode= "auto"
filterwarnings = [
'error',
'ignore::DeprecationWarning',
]
[tool.codespell]
skip = '.git,env*,__pycache__,.venv'
ignore-words-list = 'ines,ser'