fastapi-conventions
CommunityStructure FastAPI apps with modular patterns.
Software Engineering#authentication#fastapi#api-design#dependency-injection#modular-architecture#pydantic-v2
AuthorAratKruglik
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Streamline the architecture of FastAPI projects by enforcing modular design, per-feature routers, and reusable dependencies to improve maintainability and scalability.
Core Features & Use Cases
- APIRouter per feature module: Group related endpoints under a shared prefix and tags, reducing repetition and improving navigation.
- Factory pattern with lifespan management: Use a create_app() factory with an async lifespan for startup/shutdown coordination.
- Pydantic v2 schemas & validation: Leverage model_config and validators for robust data models and ORM integration.
- Dependency injection & security: Build reusable dependencies (e.g., get_db, get_current_user) and compose them across routes.
- OpenAPI customization & environment config: Centralize app settings via pydantic-settings and tailor OpenAPI output.
Quick Start
Create a FastAPI app using a create_app() factory, wire feature routers, and configure dependencies through environment settings.
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: fastapi-conventions Download link: https://github.com/AratKruglik/antigravity-sdlc/archive/main.zip#fastapi-conventions 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 510,000+ vetted skills library on demand.