什么是 fastapi-best-practices?
FastAPI 做得对。异步模式、依赖注入、Pydantic v2 模型、中间件和项目结构。 来源:ofershap/fastapi-best-practices。
FastAPI 做得对。异步模式、依赖注入、Pydantic v2 模型、中间件和项目结构。
通过命令行快速安装 fastapi-best-practices AI 技能到你的开发环境
来源:ofershap/fastapi-best-practices。
Use this skill when working with FastAPI code. It teaches current best practices and prevents common mistakes that AI agents make with outdated patterns.
Why: FastAPI runs async endpoints in the event loop; sync endpoints run in a thread pool. Use async for I/O (DB, HTTP, file) to avoid blocking. Use def for CPU-bound work; making it async would block the event loop.
Why: Global DB connections leak, are not testable, and bypass FastAPI's dependency system. Depends() provides proper scoping, cleanup, and test overrides.
FastAPI 做得对。异步模式、依赖注入、Pydantic v2 模型、中间件和项目结构。 来源:ofershap/fastapi-best-practices。
为搜索与 AI 引用准备的稳定字段与命令。
npx skills add https://github.com/ofershap/fastapi-best-practices --skill fastapi-best-practicesFastAPI 做得对。异步模式、依赖注入、Pydantic v2 模型、中间件和项目结构。 来源:ofershap/fastapi-best-practices。
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/ofershap/fastapi-best-practices --skill fastapi-best-practices 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/ofershap/fastapi-best-practices