Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Provides FastAPI best practices for writing, refactoring, and updating APIs and Pydantic models, plus fastapi CLI usage.
Use this skill ↓77% 95%+18 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 17 of 22 without it.
3 of 3 safety checks passed
Not used yet
Official FastAPI skill to write code with best practices, keeping up to date with new versions and features.
Project note: This project starts the server via
./run_services.sh(uvicorn), notfastapi dev. The patterns below still apply to all endpoint/model code.
fastapi CLIRun the development server on localhost with reload:
fastapi dev
Run the production server:
fastapi run
pyproject.tomlFastAPI CLI will read the entrypoint in pyproject.toml to know where the FastAPI app is declared.
[tool.fastapi]
entrypoint = "my_app.main:app"
fastapi with a pathWhen adding the entrypoint to pyproject.toml is not possible, or the user explicitly asks not to, or it's running an independent small app, you can pass the app file path to the fastapi command:
fastapi dev my_app/main.py
Prefer to set the entrypoint in pyproject.toml when possible.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.