This repository was archived by the owner on Nov 10, 2026. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
266 lines (253 loc) · 10.5 KB
/
Copy pathpyproject.toml
File metadata and controls
266 lines (253 loc) · 10.5 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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# region ----> project <----
[project]
name = "Air"
version = "0.48.1"
description = "The new Python web framework by the authors of Two Scoops of Django. Built with FastAPI, Starlette, and Pydantic."
readme = "README.md"
requires-python = ">=3.13,<3.15"
license = { file = "LICENSE" }
authors = [
{ name = "Audrey M. Roy Greenfeld", email = "audrey@feldroy.com" },
{ name = "Daniel Roy Greenfeld", email = "daniel@feldroy.com" }
]
maintainers = [
{ name = "Audrey M. Roy Greenfeld", email = "audrey@feldroy.com" },
{ name = "Daniel Roy Greenfeld", email = "daniel@feldroy.com" },
]
keywords = [
"air",
"air-tags",
"api",
"async",
"backend",
"css",
"fastapi",
"fasthtml",
"framework",
"frontend",
"fullstack",
"html",
"javascript",
"jinja",
"jinja2",
"openapi",
"pydantic",
"python",
"rest",
"restapi",
"restful",
"server",
"templates",
"uvicorn",
"web",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"Framework :: FastAPI",
"Framework :: Pydantic",
"Framework :: Pydantic :: 2",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: OS Independent",
"Operating System :: Unix",
"Programming Language :: JavaScript",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Internet",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing",
"Topic :: Text Processing :: Markup",
"Topic :: Text Processing :: Markup :: HTML",
"Typing :: Typed",
]
urls.Changelog = "https://github.com/feldroy/air/tree/main/CHANGELOG"
urls.Docs = "https://feldroy.github.io/air/"
urls.Homepage = "https://github.com/feldroy/air"
urls.Issues = "https://github.com/feldroy/air/issues"
urls.Repository = "https://github.com/feldroy/air"
urls.Sponsor = "https://github.com/sponsors/feldroy"
scripts.air = "air.cli:main"
dependencies = [
"Jinja2>=3.1.6", # https://pypi.org/project/Jinja2
"fastapi>=0.128.8", # https://pypi.org/project/fastapi
"frozendict>=2.4.7", # https://pypi.org/project/frozendict
"itsdangerous>=2.2.0", # https://pypi.org/project/itsdangerous
"pygments>=2.19.2,!=2.20.0; platform_system != 'Emscripten'", # https://pypi.org/project/pygments
"python-multipart>=0.0.22", # https://pypi.org/project/python-multipart
"rich>=14.3.2; platform_system != 'Emscripten'", # https://pypi.org/project/rich
"staticware>=0.2.0", # https://pypi.org/project/staticware
"tinyhtml5>=2.1.0,<3", # https://pypi.org/project/tinyhtml5
"typer>=0.23.0; platform_system != 'Emscripten'", # https://pypi.org/project/typer
"uvicorn>=0.40.0; platform_system != 'Emscripten'", # https://pypi.org/project/uvicorn
]
# endregion project
# region ----> dependencies <----
# Runtime extras you want users to install from PyPI
[project.optional-dependencies]
# Make `air[standard]` install FastAPI’s "standard" extras so users can run: uv pip install "air[standard]".
postgres = ["asyncpg>=0.30.0"]
standard = [
# Re-install FastAPI with its "standard" extra.
"fastapi[standard]>=0.128.8",
]
# Contributor-only groups under [dependency-groups]; install via uv sync --group NAME (not published to PyPI).
[dependency-groups]
# umbrella group that pulls in all dev-time groups
dev = [
{ include-group = "devtools" },
{ include-group = "docs" },
{ include-group = "examples" },
{ include-group = "test" },
{ include-group = "typing-stubs" },
]
examples = [
"pyinstrument>=5.1.2", # https://pypi.org/project/pyinstrument
]
devtools = [
"ruff>=0.15.0", # https://pypi.org/project/ruff
"ty>=0.0.19", # https://pypi.org/project/ty
]
docs = [
"click>=8.3.1", # https://pypi.org/project/click
"mkdocs>=1.6.1", # https://pypi.org/project/mkdocs
"mkdocs-autorefs>=1.4.4", # https://pypi.org/project/mkdocs-autorefs
"mkdocs-exclude>=1.0.2", # https://pypi.org/project/mkdocs-exclude
"mkdocs-llmstxt>=0.5.0", # https://pypi.org/project/mkdocs-llmstxt
"mkdocs-material[imaging]>=9.7.2", # https://pypi.org/project/mkdocs-material
"mkdocs-redirects>=1.2.2", # https://pypi.org/project/mkdocs-redirects
"mkdocstrings-python>=2.0.3", # https://pypi.org/project/mkdocstrings-python
"mkdocstrings[python]>=1.0.3", # https://pypi.org/project/mkdocstrings
]
test = [
"asyncpg>=0.30.0", # https://pypi.org/project/asyncpg (needed for ORM tests)
"coverage[toml]>=7.13.4", # https://pypi.org/project/coverage
"full-match>=0.0.3", # https://pypi.org/project/full-match
"httpx>=0.28.1", # https://pypi.org/project/httpx
"pytest>=9.0.2", # https://pypi.org/project/pytest
"pytest-asyncio>=1.3.0", # https://pypi.org/project/pytest-asyncio
"pytest-benchmark>=5.2.3", # https://pypi.org/project/pytest-benchmark
"pytest-github-actions-annotate-failures>=0.3.0", # https://pypi.org/project/pytest-github-actions-annotate-failures
"pytest-pretty>=1.3.0", # https://pypi.org/project/pytest-pretty
]
typing-stubs = [
"types-Markdown>=3.10.2.20260211", # https://pypi.org/project/types-Markdown
"types-pygments>=2.19.0.20251121", # https://pypi.org/project/types-pygments
]
# endregion dependencies
# region ----> build-system <----
# PEP 517/518: tells pip/uv how to build/install; uv installs your package (editable).
[build-system]
# Ensure the chosen backend is available; a version range keeps CI reproducible while allowing safe updates.
requires = ["uv_build>=0.9.26,<0.10.0"]
# Use uv’s build backend: fast and strict, supports PEP 660 editable installs, and produces correct tooling metadata.
build-backend = "uv_build"
# endregion build-system
# region ----> Coverage.py <----
# https://coverage.readthedocs.io/en/latest/config.html
[tool.coverage.run]
source = ["src"]
branch = true
parallel = true
sigterm = true
relative_files = true
data_file = ".coverage" # default ".coverage"
omit = ["tests/*", ".venv/*", "venv/*"]
[tool.coverage.report]
fail_under = 95
show_missing = true
skip_covered = true
ignore_errors = true
precision = 0
sort = "miss"
exclude_lines = [
# Pragmas explicitly telling Coverage to skip:
"pragma: no cover", # skip lines marked not to cover
"pragma: lax no cover", # skip lines marked lax not to cover
# TYPE_CHECKING guards:
'^\s*if\s+TYPE_CHECKING\s*:', # runtime-false typing gate
'^\s*if\s+typing\.TYPE_CHECKING\s*:', # runtime-false typing gate (qualified)
# Imports (declarations, not behavior):
'^\s*import\s+', # bare import lines
'^\s*from\s+\S+\s+import\s+', # from-import lines
# Typing/decorators/protocol markers:
'^\s*from\s+__future__\s+import\s+annotations\s*$', # future annotations import
"@overload", # typing overload stub
'@typing\.overload', # typing overload stub (qualified)
"@abstractmethod", # abstract method decorator
"@deprecated", # deprecated decorator marker
'\(Protocol\):$', # Protocol base class line
# Typing helpers and asserts:
'^\s*typing\.cast\(', # typing cast helper
'^\s*reveal_type\(', # static type reveal helper
'^\s*assert_never\(', # assert_never helper
'typing\.assert_never', # qualified assert_never
'^\s*[A-Za-z_][A-Za-z0-9_]*\s*:\s*[^=]+$', # pure annotation (no assignment)
# Main guards:
"^if __name__ == '__main__':", # entrypoint guard (single quotes)
'^if __name__ == "__main__":', # entrypoint guard (double quotes)
# Intentional stub exceptions:
'^\s*raise\s+NotImplementedError', # explicit unimplemented stub
# Common non-runtime noise:
'^\s*except\s+ImportError\s+as\s+_import_error\s*:', # optional import shim branch
'^\s*pass$', # no-op pass
'^\s*assert\s+False\b', # hard stop assertion
# Ellipsis placeholders:
'^\s*\.\.\.\s*(#.*)?$', # bare ellipsis
'^\s*return\s+\.\.\.\s*(#.*)?$', # return ellipsis
'^\s*[A-Za-z_][A-Za-z0-9_]*\s*:\s*[^=]+=\s*\.\.\.\s*$', # annotated ellipsis assignment
'^\s*(?:async\s+)?def\s+\w+\s*\(.*\)\s*(?:->[^:]+)?\s*:\s*\.\.\.$', # function body ellipsis
]
[tool.coverage.html]
directory = "htmlcov" # default "htmlcov"
[tool.coverage.xml]
output = "coverage.xml" # default "coverage.xml"
# Helpful for path normalization across OS/CI workers
[tool.coverage.paths]
source = ["src"]
# endregion Coverage.py
# region ----> uv <----
# uv - An extremely fast Python package and project manager, written in Rust.
# https://docs.astral.sh/uv/reference/settings
# uv’s own config block for this project (not PyPI metadata).
[tool.uv]
required-version = ">=0.9.8"
# Only use managed Python installations; never use system Python installations.
python-preference = "only-managed"
# Whether to enable experimental, preview features.
preview = true
# Treat this repo as a package, so uv sync/run installs it editable, enabling CLI scripts, plugins, and package info.
package = true
# Use uv’s default: include the "dev" group for uv run and uv sync unless you pass explicit --group flags.
default-groups = ["dev"]
# Cache "hints" for you (or CI) to hash and decide when to rebuild an editable install or reuse a cached environment.
cache-keys = [
{ file = "pyproject.toml" }, # Rebuild if the project config changes.
{ file = "uv.toml" }, # Rebuild if the uv config changes.
{ file = "uv.lock" }, # Rebuild if exact dependency versions change.
{ dir = "src" }, # Rebuild on library source edits.
{ dir = "tests" }, # Rebuild on test edits (keeps test env fresh).
]
# Control where uv resolves packages from.
[tool.uv.sources]
# Always use the local workspace copy of "air" instead of PyPI; in a monorepo or dev, uv uses your checked-out code.
air = { workspace = true }
# Settings specific to uv_build.
[tool.uv.build-backend]
# Declare the "src/" layout so imports come from installed package, preventing path leaks and matching user installs.
module-root = "src"
# The single top-level package name under ./src; the backend validates this to catch layout mistakes early.
module-name = "air"
# endregion uv