FastAPI Coding Standards
Comprehensive FastAPI development practices covering project structure, routing, async patterns, database access, security, and testing.
When to Use This Skill
Use this skill when:
- Building a new FastAPI application
- Structuring FastAPI project folders and routers
- Working with Pydantic models for request/response validation
- Implementing async database operations with SQLAlchemy
- Setting up dependency injection and middleware
- Adding security and authentication to FastAPI endpoints
- Testing FastAPI applications with pytest
Reference Routing Table
| Reference | Read when you need to… |
|---|---|
project-structure.md |
Set up a new FastAPI project — folder organization (routers/, models/, schemas/, services/), app initialization, middleware, API versioning |
routing-and-models.md |
Create API endpoints — Pydantic models and validators, RORO pattern, OpenAPI documentation |
async-and-database.md |
Implement database operations — async patterns with SQLAlchemy 2.0+, dependency injection, background tasks, caching |
security-and-testing.md |
Add auth/authz, error handling, input validation — testing patterns with pytest, observability, logging |
Source: imarios/open-vibes — distributed by TomeVault.