Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Fastapi Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/karthikrshet-fastapi-patterns)
---
name: fastapi-patterns
description: "FastAPI best practices: pydantic models, dependency injection, async DB access, background tasks and testing."
tags: [python, backend]
---
# Fastapi Patterns
## When to use
- FastAPI services
## Procedure
1. Pydantic v2 models for I/O
2. Dependencies for auth and DB sessions
3. Async drivers end to end
4. Lifespan for startup/shutdown
5. Test with httpx AsyncClient
## Checklist
- [ ] No blocking calls in async routes
## Anti-patterns
- Using sync DB drivers inside async endpoints