py-fastapi-patterns
CommunityFastAPI patterns for robust, scalable API design.
AuthorCJHarmath
Version1.0.0
Installs0
System Documentation
What problem does it solve?
FastAPI projects often struggle with inconsistent API design, scattered patterns, and unclear OpenAPI documentation. This Skill provides a curated set of patterns to standardize endpoint creation, dependency management, error handling, and OpenAPI schema generation across teams.
Core Features & Use Cases
- Dependency Injection patterns to share sessions, auth, and services across endpoints.
- Explicit Response Models and consistent error handling to produce clean, predictable OpenAPI docs.
- Route ordering and parameter handling to prevent ambiguous matches.
- Request Body Validation with Pydantic validators to enforce data integrity.
- Middleware and OpenAPI schema best practices to ensure robust, observable APIs.
- Router Organization patterns for scalable project structure and easy onboarding.
Quick Start
Refactor an existing FastAPI project to apply the Dependency Injection, Response Models, and Error Handling patterns described in this Skill, starting with a simple endpoint and iterating layer by layer.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: py-fastapi-patterns Download link: https://github.com/CJHarmath/claude-agents-skills/archive/main.zip#py-fastapi-patterns Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.