jobs:
publish:
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ package:
+ - fastapi
+ permissions:
+ id-token: write
steps:
- name: Dump GitHub context
env:
# Issue ref: https://github.com/actions/setup-python/issues/436
# cache: "pip"
# cache-dependency-path: pyproject.toml
- - uses: actions/cache@v4
- id: cache
- with:
- path: ${{ env.pythonLocation }}
- key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-publish
- name: Install build dependencies
run: pip install build
- name: Build distribution
+ env:
+ TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
run: python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@v1.8.14
- with:
- password: ${{ secrets.PYPI_API_TOKEN }}
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
[build-system]
-requires = ["hatchling >= 1.13.0"]
-build-backend = "hatchling.build"
+requires = ["pdm-backend"]
+build-backend = "pdm.backend"
[project]
name = "fastapi"
+dynamic = ["version"]
description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
readme = "README.md"
requires-python = ">=3.8"
-license = "MIT"
authors = [
{ name = "Sebastián RamÃrez", email = "tiangolo@gmail.com" },
]
"pydantic>=1.7.4,!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0",
"typing-extensions>=4.8.0",
]
-dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/tiangolo/fastapi"
Repository = "https://github.com/tiangolo/fastapi"
[project.optional-dependencies]
+
+# standard = [
+# # For the test client
+# "httpx >=0.23.0",
+# # For templates
+# "jinja2 >=2.11.2",
+# # For forms and file uploads
+# "python-multipart >=0.0.7",
+# # For UJSONResponse
+# "ujson >=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0",
+# # For ORJSONResponse
+# "orjson >=3.2.1",
+# # To validate email fields
+# "email_validator >=2.0.0",
+# # Uvicorn with uvloop
+# "uvicorn[standard] >=0.12.0",
+# # Settings management
+# "pydantic-settings >=2.0.0",
+# # Extra Pydantic data types
+# "pydantic-extra-types >=2.0.0",
+# ]
+
all = [
+ # # For the test client
"httpx >=0.23.0",
+ # For templates
"jinja2 >=2.11.2",
+ # For forms and file uploads
"python-multipart >=0.0.7",
+ # For Starlette's SessionMiddleware, not commonly used with FastAPI
"itsdangerous >=1.1.0",
+ # For Starlette's schema generation, would not be used with FastAPI
"pyyaml >=5.3.1",
+ # For UJSONResponse
"ujson >=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0",
+ # For ORJSONResponse
"orjson >=3.2.1",
+ # To validate email fields
"email_validator >=2.0.0",
+ # Uvicorn with uvloop
"uvicorn[standard] >=0.12.0",
+ # Settings management
"pydantic-settings >=2.0.0",
+ # Extra Pydantic data types
"pydantic-extra-types >=2.0.0",
]
-[tool.hatch.version]
-path = "fastapi/__init__.py"
+[tool.pdm]
+version = { source = "file", path = "fastapi/__init__.py" }
+distribution = true
+
+[tool.pdm.build]
+source-includes = [
+ "tests/",
+ "docs_src/",
+ "requirements*.txt",
+ "scripts/",
+ # For a test
+ "docs/en/docs/img/favicon.png",
+ ]
+
[tool.mypy]
strict = true
--e .
+-e .[all]
-r requirements-docs-tests.txt
-pydantic-settings >=2.0.0
pytest >=7.1.3,<8.0.0
coverage[toml] >= 6.5.0,< 8.0
mypy ==1.8.0
ruff ==0.2.0
-email_validator >=1.1.1,<3.0.0
dirty-equals ==0.6.0
# TODO: once removing databases from tutorial, upgrade SQLAlchemy
# probably when including SQLModel
sqlalchemy >=1.3.18,<1.4.43
databases[sqlite] >=0.3.2,<0.7.0
-orjson >=3.2.1,<4.0.0
-ujson >=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,<6.0.0
-python-multipart >=0.0.7,<0.1.0
flask >=1.1.2,<3.0.0
anyio[trio] >=3.2.1,<4.0.0
python-jose[cryptography] >=3.3.0,<4.0.0