← ClaudeAtlas

fastapi-workflowlisted

Docs-first development workflow for Python + FastAPI + Pydantic v2 projects with async APIs, dependency injection, and SQLAlchemy. Fetches current documentation via MCP before any implementation. Use when building or modifying FastAPI backends, API endpoints, Pydantic models, or database operations. Trigger phrases - "fastapi", "python api", "backend api", "pydantic", "sqlalchemy", "async api", "dependency injection". NOT for frontend work (use frontend-app/frontend-lp) or non-Python backends.
diegosouzapw/awesome-omni-skill · ★ 43 · API & Backend · score 61
Install: claude install-skill diegosouzapw/awesome-omni-skill
# FastAPI Workflow-Driven Development Skill ## CRITICAL PRINCIPLE **DOCS FIRST, CODE SECOND** You MUST NEVER generate FastAPI code without first fetching relevant documentation via MCP tools. This is NON-NEGOTIABLE. Every workflow below has MANDATORY MCP fetch steps that MUST be completed before implementation. ## When to Use This Skill Use this skill for ALL FastAPI development tasks: - Creating API endpoints (routers) - Defining Pydantic models (request/response) - Implementing dependency injection - Database operations (SQLAlchemy) - Authentication/authorization - Background tasks - WebSocket endpoints - Any Python backend code with FastAPI ## Current Stack Requirements **Required Versions:** - Python 3.11+ (3.12+ recommended) - FastAPI 0.124+ - Pydantic 2.12+ (v2 is default, v1 support is DEPRECATED) - SQLAlchemy 2.0.44+ (async support) - Uvicorn (ASGI server) - scalar-fastapi (API docs — replaces Swagger UI and ReDoc) **DEPRECATED:** - Pydantic v1 compatibility will be removed in future FastAPI versions **Key Pydantic v2 Changes:** - `model_validator` instead of `validator` - `field_validator` instead of `validator` - `ConfigDict` instead of `class Config` - Performance boost (Rust core) - Strict mode available ## API Documentation Setup (Scalar) **ALWAYS use Scalar instead of Swagger UI / ReDoc.** Scalar provides modern, interactive API docs with dark mode, search, and code snippets. **Setup pattern:** ```python # requirements.txt scalar-fastapi>=1.6.0