Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
189 lines (170 loc) · 3.75 KB
/
Copy pathpyproject.toml
File metadata and controls
189 lines (170 loc) · 3.75 KB
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
182
183
184
185
186
187
188
189
[project]
name = "python-cookbook"
description = "Recipes for Python. Hands-on code examples and snippets for daily work."
authors = [{ name = "Li Yun", email = "lucassix.lee@gmail.com" }]
readme = "README.md"
requires-python = ">=3.13"
license-files = ["LICEN[CS]E*"]
maintainers = [{ name = "Li Yun", email = "lucassix.lee@gmail.com" }]
keywords = ["cookbook", "recipe", "fastapi", "sql", "mongodb"]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Topic :: Software Development :: Documentation",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Operating System :: OS Independent",
"Typing :: Typed",
]
dependencies = [
"pydantic",
"fastapi[all]",
"uvicorn[standard]",
"sqlmodel>=0.0.24",
"pymongo>=4.15.5",
#"beanie",
#"pyodmongo",
"redis[hiredis]",
"types-redis",
"aiomqtt",
#"requests",
#"types-requests",
]
dynamic = ["version"]
[project.urls]
Home = "https://lucas-six.github.io/python-cookbook/"
Documentation = "https://lucas-six.github.io/python-cookbook/"
Repository = "https://github.com/lucas-six/python-cookbook/"
[tool.setuptools]
py-modules = ['cookbook', 'examples']
[[tool.uv.index]]
url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
default = true
[dependency-groups]
dev = [
"mypy>=1.18.2",
"ruff>=0.12.1",
"pytest",
"coverage[toml]>=7.10.7",
"pytest-cov>=7.0.0",
]
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
# Same as Black.
line-length = 100
indent-width = 4
target-version = "py313"
[tool.ruff.lint]
extend-safe-fixes = [
# non-pep585-annotation
"UP006",
]
select = [
# flake8-annotations
"ANN",
# flake8-bugbear
"B",
# flake8-comprehensions
"C4",
# pycodestyle
"E",
# Pyflakes errors
"F",
# isort
"I",
# flake8-simplify
"SIM",
# flake8-tidy-imports
"TID",
# pyupgrade
"UP",
# Pyflakes warnings
"W",
]
ignore = []
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
[tool.ruff.lint.mccabe]
max-complexity = 12
[tool.mypy]
python_version = "3.13"
plugins = ["pydantic.mypy"]
exclude = []
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
warn_unused_configs = true
disallow_any_generics = false
check_untyped_defs = true
no_implicit_reexport = true
disallow_untyped_defs = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[[tool.mypy.overrides]]
module = "redis.*"
ignore_missing_imports = true
[tool.pytest.ini_options]
markers = []
addopts = [
"--strict-markers",
"--cov",
"--cov-append",
"--durations=5",
"--durations-min=0.25",
]
norecursedirs = [".git", ".venv", ".*_cache", ".tox", "*.egg-info", "docs"]
[tool.coverage.run]
parallel = true
[tool.coverage.report]
skip_empty = true
[tool.pyright]
include = ["examples"]
exclude = [
".git",
"**/__pycache__",
".venv",
"**/*.egg-info",
".ruff_cache",
".mypy_cache",
".pytest_cache",
".tox",
]
reportGeneralTypeIssues = "none"
reportUnboundVariable = "none"
stubPath = ""
pythonVersion = "3.13"