fastapi-templates
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
By wshobson · 24,112 installs
npx skills add wshobson/agents --skill fastapi-templates
Source repository · Upstream listing
FastAPI Project Templates
Production ready FastAPI project structures with async patterns, dependency injection, middleware, and best practices for building high performance APIs.
When to Use This Skill
Starting new FastAPI projects from scratch
Implementing async REST APIs with Python
Building high performance web services and microservices
Creating async applications with PostgreSQL, MongoDB
Setting up API projects with proper structure and testing
Core Concepts
1. Project Structure
Recommended Layout:
2. Dependency Injection
FastAPI's built in DI system using Depends :
Database session management
Authentication/authorization
Shared business logic
Configuration injection
3. Async Patterns
Proper async/await usage:
Async route handlers
Async database operations
Async background tasks
Async middleware
Detailed worked examples and patterns
Detailed sections (starting with Implementation Patterns ) live in references/details.md . Read that file when the navigation summary above is insufficient.
Testing