mcpField
F
fastapi

fastapi

github.com/full-stack-skillsDevelopment3133 installsUpdated 5w ago
Repository

About fastapi

fastapi is a skill that guides developers building REST and asynchronous APIs with FastAPI. It covers routing, Pydantic models, dependency injection, documentation, and deployment practices.

Key features

  1. 01Build REST and asynchronous APIs
  2. 02Define routes and request parameters
  3. 03Model and validate data with Pydantic
  4. 04Use dependencies, OAuth2, and background tasks
  5. 05Configure middleware and OpenAPI documentation

Use cases

  1. 01Create API endpoints with request validation
  2. 02Structure dependencies and OAuth2 authentication
  3. 03Add background tasks or WebSocket handling
  4. 04Prepare API documentation and deployment configuration

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/full-stack-skills/python-skills --skill fastapi

After installing, type/fastapiin Claude Code to confirm it loaded.

Bundled filesagents/openai.yamlLICENSE.txt

Details

From the project README

When to use this skill

Use this skill whenever the user wants to:

  • 用 FastAPI 编写 REST/异步 API、Pydantic 模型与依赖注入
  • 配置路由、中间件、文档与部署

How to use this skill

  1. 核心:FastAPI()、@app.get/post、Path/Query/Body;Pydantic 模型与校验。
  2. 进阶:Depends、OAuth2、后台任务、WebSocket;OpenAPI 文档。
  3. 参考:https://fastapi.tiangolo.com/

Best Practices

  • 模型与响应 schema 明确;异常与状态码统一。
  • 异步与数据库连接池;安全与 CORS 配置。

Keywords

fastapi, 异步 API, Pydantic, OpenAPI

Comments

Markdown supported