208663340/opc-delivery/python-fastapi
Claude Code and agent skill by 208663340/opc-delivery
- community
Checking that the SKILL.md file is still in the repository.
FastAPI APIs with Pydantic, OpenAPI, dependencies, security, middleware, lifespan, and response models. Use for routes, validation, authentication or authorization, database-session dependencies, CORS, sync versus async handlers, pagination, errors, or startup and shutdown resources. For ORM mechanics, use python-sqlalchemy.
Install
npx vskill@latest install 208663340/opc-delivery/python-fastapiSKILL.md
The same SKILL.md was published earlier as 208663340/opc-delivery/python-fastapi.
FastAPI - Modern Python Web APIs
FastAPI is a modern, fast web framework for building APIs with Python, using standard Python type hints. FastAPI automatically validates requests, generates OpenAPI documentation, and provides excellent developer experience.
Quick Start
Basic Application
Run with:
Core Concepts
Request & Response Models
Use Pydantic models for automatic validation and serialization:
See references/validation.md for detailed validation patterns including custom validators and field constraints.
Routers for Organization
Split routes across routers for clean organization:
Dependency Injection
FastAPI's core feature for managing dependencies like database sessions and authentication:
The dependency owns cleanup only. Use application-service transaction boundaries (with db.begin():) for writes. Yield dependency cleanup defaults to after the response; use Depends(get_db, scope="function") only when cleanup must finish before it is sent.
See references/dependencies.md for auth, scopes, transactions, and testing overrides.
Error Handling
HTTP Exceptions
Custom Exception Handlers
Project Structure
Reference Materials
Detailed patterns for common scenarios:
- Validation:
references/validation.md- Field constraints, custom validators, model validation - Dependencies:
references/dependencies.md- Auth services, scoped dependencies, advanced injection patterns - Middleware:
references/middleware.md- CORS, custom middleware, request/response processing - API Design:
references/api-design.md- REST naming, pagination, OpenAPI customization, status codes
Best Practices
- Use validated output schemas - A return annotation or
response_modelfilters structured output; deliberately omit it for directResponsesubclasses, files, or streams. - Validate inputs - Use Pydantic models with constraints
- Dependency injection - Manage sessions, auth, and cross-cutting concerns
- Router organization - Split routes by resource/domain
- Error handling - Use HTTP exceptions and custom handlers appropriately
- Lifespan and handler choice - Use
FastAPI(lifespan=...)for application resources. Useasync defonly for awaited I/O; usedeffor blocking libraries.
Security
- Security scanPassed, 98 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/python-fastapi/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/208663340/opc-delivery/python-fastapi)