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.
- email_validator
for email validation.
Starlette can use the optional dependencies
- httpx
if you want to use the
TestClient.- jinja
if you want to use the default template configuration.
- graphene
for
GraphQLAppsupport.- orjson
if you want to use
ORJSONResponse.- aiofiles
if you want to use
FileResponseorStaticFiles.- itsdangerous
required for
SessionMiddlewaresupport.- pyyaml
for Starlette’s
SchemaGeneratorsupport.- python-multipart
if you want to support form parsing, with
request.form().- 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]
See also