1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-05 08:55:23 +02:00
tldr/pages/common/fastapi.md
Harshavardhan dd977f9733
fastapi: add page and Chinese and Korean translation (#17033)
* Added tldr pages for fastapi[standard]

* Removed the trailing white spaces

* Updated the links

* CLI to run -> Run

* Modified commands to be more general

* Modified changes for {{subcommand}}

* Update pages.zh/common/fastapi.md

* fixed bot issues

* fixed the translation bot issues

---------

Co-authored-by: Wiktor Perskawiec <wiktor@perskawiec.cc>
2025-07-01 14:23:57 +09:00

683 B

fastapi

Run FastAPI apps which uses Uvicorn under the hood. More information: https://manned.org/fastapi.

  • 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