Files
template-fastapi/pyproject.toml.jinja
Aleksei Sokol 53f14a8624
All checks were successful
Run linters on applied template / Python 3.13 lint and build (push) Successful in 1m40s
Version 0.4.0
Changes:
- put ObservabilityMiddleware before ExceptionHandlerMiddleware to avoid repetative code
- add application startup and last metrics update metrics along with CPU usage metric and threads count
- move host and port to new uvicorn section at config along with new reload and forwarded_allow_ips
- add request_id and remove trace_id/span_id generation if tracing is disabled
- move logging logic from utils to observability
- pass trace_id/span_id in HEX form
2026-01-03 16:29:58 +03:00

68 lines
1.7 KiB
Django/Jinja

[project]
name = "{{project_name}}"
version = "0.1.0"
description = "{{project_description}}"
authors = [{ name = "IDU lab team", email = "idu@itmo.ru" }]
license = { text = "Apache 2.0" }
readme = "README.md"
requires-python = ">= 3.11"
dependencies = [
"fastapi (>=0.117.1,<0.118.0)",
"structlog (>=25.4.0,<26.0.0)",
"sqlalchemy (>=2.0.43,<3.0.0)",
"alembic (>=1.16.5,<2.0.0)",
"dotenv (>=0.9.9,<0.10.0)",
"pyyaml (>=6.0.3,<7.0.0)",
"uvicorn (>=0.38.0,<0.39.0)",
"asyncpg (>=0.30.0,<0.31.0)",
"opentelemetry-exporter-otlp (>=1.39.1,<2.0)",
"opentelemetry-exporter-prometheus (>=0.60b1,<0.61)",
"opentelemetry-semantic-conventions (>=0.60b1,<0.61)",
"opentelemetry-instrumentation-logging (>=0.60b1,<0.61)",
"aiohttp (>=3.13.2,<4.0.0)",
"email-validator (>=2.3.0,<3.0.0)",
"pyjwt (>=2.10.1,<3.0.0)",
"psutil (>=7.2.1,<8.0.0)",
]
[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"
[dependency-groups]
dev = [
"black (>=25.9.0,<26.0.0)",
"isort (>=6.0.1,<7.0.0)",
"pylint (>=3.3.8,<4.0.0)",
]
[tool.poetry.scripts]
{{project_name}} = "{{project_slug}}.__main__:main"
[tool.black]
line-length = 120
target-version = ['py311']
[tool.pylint.format]
max-line-length = 120
expected-line-ending-format = "LF"
extension-pkg-allow-list = []
ignored-modules = ["alembic.context"]
disable = [
"duplicate-code",
"missing-module-docstring",
"missing-class-docstring",
"missing-function-docstring",
]
[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
line_length = 120
split_on_trailing_comma = true
profile = "black"