Install & Compatibility
Where this runs
tested against v0.0.32 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 82.6MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 6.7s · import 0.000s · 85MB
86MB installed
● package 86MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
fastapi
✓ This is a command-line utility, not a Python library meant for direct import into Python code. You invoke it from your terminal.
The primary interaction is via the 'fastapi' command in the shell, e.g., 'fastapi dev'.
Create a `main.py` file with a basic FastAPI application instance named `app`. Then, run the application using `fastapi dev main.py` for development with auto-reload. For more explicit project setup, configure the `entrypoint` in `pyproject.toml` and then simply run `fastapi dev`.
# main.py
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def read_root():
return {"message": "Hello FastAPI CLI!"}
# Terminal commands
# Run in development mode (with auto-reload):
# fastapi dev main.py
# Or, for explicit configuration (recommended for larger projects):
# 1. Add to pyproject.toml:
# [tool.fastapi]
# entrypoint = "main:app"
# 2. Then run:
# fastapi dev
fastapi --version
Debug
Known issues
breakingDropped support for Python 3.9 in version 0.0.23, and Python 3.8 in version 0.0.19. Ensure your project's Python version meets the minimum requirement (>=3.10).fixUpgrade your Python environment to 3.10 or newer.
affects: 0.0.19, 0.0.23 and later
breakingDropped support for Pydantic v1 in version 0.0.17. This may cause issues if your project relies on Pydantic v1. Note that version 0.0.16 had temporarily fixed Pydantic v1 support, but it was subsequently dropped again.fixUpgrade Pydantic to v2 and migrate your models if necessary, or pin `fastapi-cli` to an older version (e.g., <=0.0.16) if Pydantic v1 compatibility is critical.
affects: 0.0.17 and later (after 0.0.16)
deprecatedThe `fastapi-cli-slim` package was deprecated in version 0.0.21. Projects should now directly use `fastapi-cli`.fixMigrate from `fastapi-cli-slim` to `fastapi-cli` if you were using the slim version.
affects: 0.0.21 and later
gotchaAlways use `fastapi dev` for local development and `fastapi run` for production-like environments. `fastapi dev` enables auto-reload and binds to `127.0.0.1` (localhost), while `fastapi run` disables auto-reload and binds to `0.0.0.0` (accessible externally), which is suitable for containers or behind a reverse proxy. Using `fastapi dev` in production is resource-intensive and less stable.fixUse `fastapi run` for deploying your application. For robust production deployments, consider using a process manager like Gunicorn with Uvicorn, and a reverse proxy like Nginx.
affects: All versions
gotchaFor complex project structures or when other tools need to find your app, it's highly recommended to configure the `entrypoint` in your `pyproject.toml` file rather than always passing the file path to `fastapi dev` or `fastapi run`.fixAdd a `[tool.fastapi]` section to your `pyproject.toml` with `entrypoint = "your_module:your_app_instance"` (e.g., `entrypoint = "main:app"`).
affects: All versions
Upgrade
Version history
0.0.32latest on PyPI · released Jul 16, 2026
Audit
Dependencies
fastapirequiredCore framework the CLI manages.
typerrequiredUsed for building the command-line interface.
uvicornrequiredHigh-performance ASGI server used internally by the CLI to run applications.
fastapi-cloud-clioptionalIncluded with `fastapi[standard]` for FastAPI Cloud deployments; can be excluded via `fastapi[standard-no-fastapi-cloud-cli]`.