python-fastapi
FastAPI async web services, Pydantic v2 validation, dependency injection, and background tasks.
SKILL.mdskills/python-fastapi/SKILL.md
GitHubFastAPI & Async Python Protocol
Build lightning-fast, typed Python REST APIs.
1. Async Endpoints & Concurrency
- Define I/O-bound endpoints with
async defandawaitasync DB queries. - Use standard
deffor CPU-bound routes so FastAPI executes them in an internal thread pool without blocking event loops.
2. Pydantic v2 Models
- Use
field_validatorandmodel_validatorfor strict schema enforcement. - Set
model_config = ConfigDict(extra='forbid', str_strip_whitespace=True).