FastAPI Router Py
Intermediatev1.0.0
Create FastAPI routers with CRUD operations, authentication dependencies, and proper response models.
Content
Create FastAPI routers following established patterns with proper authentication, response models, and HTTP status codes.
Quick Start
Copy the template from assets/template.py and replace placeholders:
- -
{{ResourceName}}→ PascalCase name (e.g.,Project) - -
{{resource_name}}→ snake_case name (e.g.,project) - -
{{resource_plural}}→ plural form (e.g.,projects)
Authentication Patterns
Response Models
HTTP Status Codes
Integration Steps
1. Create router in src/backend/app/routers/
2. Mount in src/backend/app/main.py
3. Create corresponding Pydantic models
4. Create service layer if needed
5. Add frontend API functions
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
FAQ
Discussion
Loading comments...