fastapi
/
pyproject.toml
196 строк · 7.2 Кб
1[build-system]2requires = ["hatchling >= 1.13.0"]3build-backend = "hatchling.build"4
5[project]6name = "fastapi"7description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"8readme = "README.md"9requires-python = ">=3.8"10license = "MIT"11authors = [12{ name = "Sebastián Ramírez", email = "tiangolo@gmail.com" },13]
14classifiers = [15"Intended Audience :: Information Technology",16"Intended Audience :: System Administrators",17"Operating System :: OS Independent",18"Programming Language :: Python :: 3",19"Programming Language :: Python",20"Topic :: Internet",21"Topic :: Software Development :: Libraries :: Application Frameworks",22"Topic :: Software Development :: Libraries :: Python Modules",23"Topic :: Software Development :: Libraries",24"Topic :: Software Development",25"Typing :: Typed",26"Development Status :: 4 - Beta",27"Environment :: Web Environment",28"Framework :: AsyncIO",29"Framework :: FastAPI",30"Framework :: Pydantic",31"Framework :: Pydantic :: 1",32"Intended Audience :: Developers",33"License :: OSI Approved :: MIT License",34"Programming Language :: Python :: 3 :: Only",35"Programming Language :: Python :: 3.8",36"Programming Language :: Python :: 3.9",37"Programming Language :: Python :: 3.10",38"Programming Language :: Python :: 3.11",39"Programming Language :: Python :: 3.12",40"Topic :: Internet :: WWW/HTTP :: HTTP Servers",41"Topic :: Internet :: WWW/HTTP",42]
43dependencies = [44"starlette>=0.36.3,<0.37.0",45"pydantic>=1.7.4,!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0",46"typing-extensions>=4.8.0",47]
48dynamic = ["version"]49
50[project.urls]51Homepage = "https://github.com/tiangolo/fastapi"52Documentation = "https://fastapi.tiangolo.com/"53Repository = "https://github.com/tiangolo/fastapi"54
55[project.optional-dependencies]56all = [57"httpx >=0.23.0",58"jinja2 >=2.11.2",59"python-multipart >=0.0.7",60"itsdangerous >=1.1.0",61"pyyaml >=5.3.1",62"ujson >=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0",63"orjson >=3.2.1",64"email_validator >=2.0.0",65"uvicorn[standard] >=0.12.0",66"pydantic-settings >=2.0.0",67"pydantic-extra-types >=2.0.0",68]
69
70[tool.hatch.version]71path = "fastapi/__init__.py"72
73[tool.mypy]74strict = true75
76[[tool.mypy.overrides]]77module = "fastapi.concurrency"78warn_unused_ignores = false79ignore_missing_imports = true80
81[[tool.mypy.overrides]]82module = "fastapi.tests.*"83ignore_missing_imports = true84check_untyped_defs = true85
86[[tool.mypy.overrides]]87module = "docs_src.*"88disallow_incomplete_defs = false89disallow_untyped_defs = false90disallow_untyped_calls = false91
92[tool.pytest.ini_options]93addopts = [94"--strict-config",95"--strict-markers",96"--ignore=docs_src",97]
98xfail_strict = true99junit_family = "xunit2"100filterwarnings = [101"error",102# TODO: needed by asyncio in Python 3.9.7 https://bugs.python.org/issue45097, try to remove on 3.9.8103'ignore:The loop argument is deprecated since Python 3\.8, and scheduled for removal in Python 3\.10:DeprecationWarning:asyncio',104'ignore:starlette.middleware.wsgi is deprecated and will be removed in a future release\..*:DeprecationWarning:starlette',105# TODO: remove after upgrading HTTPX to a version newer than 0.23.0106# Including PR: https://github.com/encode/httpx/pull/2309107"ignore:'cgi' is deprecated:DeprecationWarning",108# For passlib109"ignore:'crypt' is deprecated and slated for removal in Python 3.13:DeprecationWarning",110# see https://trio.readthedocs.io/en/stable/history.html#trio-0-22-0-2022-09-28111"ignore:You seem to already have a custom.*:RuntimeWarning:trio",112"ignore::trio.TrioDeprecationWarning",113# TODO remove pytest-cov114'ignore::pytest.PytestDeprecationWarning:pytest_cov',115# TODO: remove after upgrading SQLAlchemy to a version that includes the following changes116# https://github.com/sqlalchemy/sqlalchemy/commit/59521abcc0676e936b31a523bd968fc157fef0c2117'ignore:datetime\.datetime\.utcfromtimestamp\(\) is deprecated and scheduled for removal in a future version\..*:DeprecationWarning:sqlalchemy',118# TODO: remove after upgrading python-jose to a version that explicitly supports Python 3.12119# also, if it won't receive an update, consider replacing python-jose with some alternative120# related issues:121# - https://github.com/mpdavis/python-jose/issues/332122# - https://github.com/mpdavis/python-jose/issues/334123'ignore:datetime\.datetime\.utcnow\(\) is deprecated and scheduled for removal in a future version\..*:DeprecationWarning:jose',124# TODO: remove after upgrading Starlette to a version including https://github.com/encode/starlette/pull/2406125# Probably Starlette 0.36.0126"ignore: The 'method' parameter is not used, and it will be removed.:DeprecationWarning:starlette",127]
128
129[tool.coverage.run]130parallel = true131source = [132"docs_src",133"tests",134"fastapi"135]
136context = '${CONTEXT}'137omit = [138"docs_src/response_model/tutorial003_04.py",139"docs_src/response_model/tutorial003_04_py310.py",140]
141
142[tool.ruff]143select = [144"E", # pycodestyle errors145"W", # pycodestyle warnings146"F", # pyflakes147"I", # isort148"B", # flake8-bugbear149"C4", # flake8-comprehensions150"UP", # pyupgrade151]
152ignore = [153"E501", # line too long, handled by black154"B008", # do not perform function calls in argument defaults155"W191", # indentation contains tabs156]
157
158[tool.ruff.per-file-ignores]159"__init__.py" = ["F401"]160"docs_src/dependencies/tutorial007.py" = ["F821"]161"docs_src/dependencies/tutorial008.py" = ["F821"]162"docs_src/dependencies/tutorial009.py" = ["F821"]163"docs_src/dependencies/tutorial010.py" = ["F821"]164"docs_src/custom_response/tutorial007.py" = ["B007"]165"docs_src/dataclasses/tutorial003.py" = ["I001"]166"docs_src/path_operation_advanced_configuration/tutorial007.py" = ["B904"]167"docs_src/path_operation_advanced_configuration/tutorial007_pv1.py" = ["B904"]168"docs_src/custom_request_and_route/tutorial002.py" = ["B904"]169"docs_src/dependencies/tutorial008_an.py" = ["F821"]170"docs_src/dependencies/tutorial008_an_py39.py" = ["F821"]171"docs_src/query_params_str_validations/tutorial012_an.py" = ["B006"]172"docs_src/query_params_str_validations/tutorial012_an_py39.py" = ["B006"]173"docs_src/query_params_str_validations/tutorial013_an.py" = ["B006"]174"docs_src/query_params_str_validations/tutorial013_an_py39.py" = ["B006"]175"docs_src/security/tutorial004.py" = ["B904"]176"docs_src/security/tutorial004_an.py" = ["B904"]177"docs_src/security/tutorial004_an_py310.py" = ["B904"]178"docs_src/security/tutorial004_an_py39.py" = ["B904"]179"docs_src/security/tutorial004_py310.py" = ["B904"]180"docs_src/security/tutorial005.py" = ["B904"]181"docs_src/security/tutorial005_an.py" = ["B904"]182"docs_src/security/tutorial005_an_py310.py" = ["B904"]183"docs_src/security/tutorial005_an_py39.py" = ["B904"]184"docs_src/security/tutorial005_py310.py" = ["B904"]185"docs_src/security/tutorial005_py39.py" = ["B904"]186"docs_src/dependencies/tutorial008b.py" = ["B904"]187"docs_src/dependencies/tutorial008b_an.py" = ["B904"]188"docs_src/dependencies/tutorial008b_an_py39.py" = ["B904"]189
190
191[tool.ruff.isort]192known-third-party = ["fastapi", "pydantic", "starlette"]193
194[tool.ruff.pyupgrade]195# Preserve types, even if a file imports `from __future__ import annotations`.
196keep-runtime-typing = true197