fastapi
Installation
SKILL.md
When to use this skill
Use this skill whenever the user wants to:
- 用 FastAPI 编写 REST/异步 API、Pydantic 模型与依赖注入
- 配置路由、中间件、文档与部署
How to use this skill
- 核心:FastAPI()、@app.get/post、Path/Query/Body;Pydantic 模型与校验。
- 进阶:Depends、OAuth2、后台任务、WebSocket;OpenAPI 文档。
- 参考:https://fastapi.tiangolo.com/
Best Practices
- 模型与响应 schema 明确;异常与状态码统一。
- 异步与数据库连接池;安全与 CORS 配置。