When to use this skill
Use this skill whenever the user wants to:
- Write REST/async APIs with FastAPI, Pydantic models, and dependency injection
- Configure routing, middleware, documentation, and deployment
How to use this skill
- Core: FastAPI(), @app.get/post, Path/Query/Body; Pydantic models and validation.
- Advanced: Depends, OAuth2, background tasks, WebSocket; OpenAPI documentation.
- Reference:https://fastapi.tiangolo.com/
Best Practices
- Models and response schemas are explicit; exceptions and status codes are unified.
- Asynchrony and database connection pooling; security and CORS configuration.
Keywords
fastapi, async API, Pydantic, OpenAPI