← ClaudeAtlas

fastapi-patternslisted

FastAPI patterns for building production-grade APIs — routing, Pydantic models, dependency injection, middleware, async patterns, WebSockets, and background tasks.
Izangi2714/claude-code-python-stack · ★ 0 · API & Backend · score 65
Install: claude install-skill Izangi2714/claude-code-python-stack
# FastAPI Development Patterns Production-grade FastAPI architecture patterns for high-performance async APIs. ## When to Activate - Building FastAPI web applications - Designing REST or GraphQL APIs with FastAPI - Working with async Python and ASGI - Setting up dependency injection - Implementing WebSockets or background tasks ## Project Structure ``` myproject/ ├── src/ │ └── app/ │ ├── __init__.py │ ├── main.py # FastAPI app factory │ ├── config.py # Settings (Pydantic BaseSettings) │ ├── dependencies.py # Shared dependencies │ ├── middleware.py # Custom middleware │ ├── api/ │ │ ├── __init__.py │ │ ├── v1/ │ │ │ ├── __init__.py │ │ │ ├── router.py # APIRouter aggregator │ │ │ ├── users.py │ │ │ ├── products.py │ │ │ └── auth.py │ │ └── deps.py # API-specific dependencies │ ├── models/ # SQLAlchemy models │ │ ├── __init__.py │ │ ├── user.py │ │ └── product.py │ ├── schemas/ # Pydantic schemas │ │ ├── __init__.py │ │ ├── user.py │ │ └── product.py │ ├── services/ # Business logic │ │ ├── __init__.py │ │ ├── user_service.py │ │ └── product_service.py │ ├── repositories/ # Data access │ │ ├── __init__.py │ │ └── user_repo.py │ └── core/ │ ├── __