Installation

Requirements

$ uv add fastapi
Adding fastapi to Pipfile's [packages]…
✔ Installation Succeeded
Locking [dev-packages] dependencies…
✔ Success!
Locking [packages] dependencies…
✔ Success!

Optional requirements

For production you also need an ASGI server, such as uvicorn:

$ uv add uvicorn
Adding uvicorn to Pipfile's [packages]…
✔ Installation Succeeded
Locking [dev-packages] dependencies…
✔ Success!
Locking [packages] dependencies…
✔ Success!
Updated Pipfile.lock (051f02)!

Pydantic can use the optional dependencies

ujson

for faster JSON parsing.

Stars Contributors Commit activity Lizenz
email_validator

for email validation.

Stars Contributors Commit activity Lizenz

Starlette can use the optional dependencies

httpx

if you want to use the TestClient.

Stars Contributors Commit activity Lizenz
jinja

if you want to use the default template configuration.

Stars Contributors Commit activity Lizenz
graphene

for GraphQLApp support.

Stars Contributors Commit activity Lizenz
orjson

if you want to use ORJSONResponse.

Stars Contributors Commit activity Lizenz
aiofiles

if you want to use FileResponse or StaticFiles.

Stars Contributors Commit activity Lizenz
itsdangerous

required for SessionMiddleware support.

Stars Contributors Commit activity Lizenz
pyyaml

for Starlette’s SchemaGenerator support.

Stars Contributors Commit activity Lizenz
python-multipart

if you want to support form parsing, with request.form().

Stars Contributors Commit activity Lizenz
ujson

if you want to use UJSONResponse.

They can be installed, e.g. with:

$ uv add fastapi[ujson]

Alternatively you can install all of these with:

$ uv add fastapi[all]