fastapi-patternslisted
Install: claude install-skill ku5ic/dotfiles
# FastAPI patterns
FastAPI 0.136.1, Pydantic 2.13.3 (baseline at time of writing). Verify current versions at https://pypi.org/project/fastapi/ and https://pypi.org/project/pydantic/. Adapt advice to the versions in the project's `requirements.txt`, `pyproject.toml`, or lockfile.
Install: `pip install "fastapi[standard]"`
## When to load this skill
- Project has `fastapi` in `requirements.txt`, `pyproject.toml`, or `Pipfile`
- Files contain `from fastapi import`, `@app.get`, `@router.get`
- Pydantic `BaseModel` used as route input/output type
- User asks about FastAPI, Pydantic v2, dependency injection, Depends(), response_model, HTTPException, OAuth2, APIKey
## When not to load this skill
- Django or Flask without FastAPI
- Pydantic used outside a web framework (standalone validation)
- GraphQL with strawberry or ariadne
## Reference files
| File | Topics |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- |
| [pydantic-schemas.md](reference/pydantic-schemas.md) | BaseModel, Field(), field_validator, model_validator, model_config, ConfigDict, separate input/output schemas |
| [dependency-injection.md](reference/dependency-injection.md) | Depends(), Annotated pattern, yield depende