fastapi - Man Page
fastapi – FastAPI CLI – The fastapi command line app.
Examples (TL;DR)
- Run a FastAPI app with automatic reload (for development):
fastapi run path/to/file.py --reload - Serve your app in both development mode:
fastapi dev path/to/file.py - Specify the host and port to run on:
fastapi run path/to/file.py --host host_address --port port - Set the app variable name (if not
app) or specify a custom app directory:fastapi run path/to/file.py --app-dir path/to/app --app custom_app_name - Display help:
fastapi --help - Display help for a subcommand:
fastapi subcommand --help
Synopsis
fastapi [Options] COMMAND [ARGS]...
Description
Manage your FastAPI projects, run your FastAPI apps, and more.
Options
- --version
Show the version and exit.
- --verbose, --no-verbose
Enable verbose output [default: no-verbose]
- --install-completion
Install completion for the current shell.
- --show-completion
Show completion for the current shell, to copy it or customize the installation.
- --help
Show a help message and exit.
Commands
- dev
Run a FastAPI app in development mode.
- run
Run a FastAPI app in production mode.
- deploy
Deploy a FastAPI app to FastAPI Cloud.
- login
Login to FastAPI Cloud.
- cloud
Manage FastAPI Cloud deployments.
The fastapi-cloud-cli package must be installed.
- new
Create a new FastAPI project in one command. ✨
The fastapi-new package must be installed.
See Also
fastapi-dev(1), fastapi-run(1), fastapi-deploy(1), fastapi-login(1), fastapi-cloud(1), fastapi-new(1)
Referenced By
fastapi-cloud(1), fastapi-cloud-deploy(1), fastapi-cloud-env(1), fastapi-cloud-env-delete(1), fastapi-cloud-env-list(1), fastapi-cloud-env-set(1), fastapi-cloud-link(1), fastapi-cloud-login(1), fastapi-cloud-logout(1), fastapi-cloud-logs(1), fastapi-cloud-unlink(1), fastapi-cloud-whoami(1), fastapi-deploy(1), fastapi-dev(1), fastapi-login(1), fastapi-new(1), fastapi-run(1).