python-fastapi-development
构建 FastAPI 后端
此技能提供了一套完整的工作流程,用于构建生产就绪的 Python FastAPI 后端,包括数据库集成、身份验证、测试和部署模式。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“python-fastapi-development”。 Use @python-fastapi-development to scaffold a new FastAPI project
预期结果:
此技能提供了一个结构化的 8 阶段工作流程:
第一阶段:项目搭建
- 技能:app-builder、python-scaffold、fastapi-templates
- 操作:环境设置、项目结构、FastAPI 配置
第二阶段:数据库设置
- 技能:database-design、pydantic-models
- 操作:模式设计、SQLAlchemy 模型、迁移
[继续所有 8 个阶段...]
正在使用“python-fastapi-development”。 What phases does the FastAPI development workflow include?
预期结果:
该工作流程包括 8 个阶段:
1. 项目搭建
2. 数据库设置
3. API 路由
4. 身份验证
5. 错误处理
6. 测试
7. 文档
8. 部署
安全审计
安全Security audit completed. All static findings are false positives. The 'external_commands' flagged lines are skill references (@skill-name) not shell executions. The 'weak cryptographic algorithm' flags are markdown references, not code. This is a legitimate FastAPI development workflow documentation file with no actual security risks.
质量评分
你能构建什么
新 FastAPI 项目搭建
快速搭建具有正确结构、日志和环境配置的新 FastAPI 项目。
数据库集成
为生产应用程序设置 SQLAlchemy 模型、迁移和数据库连接。
完整 API 开发
按照结构化的 8 阶段工作流程,从项目搭建到部署。
试试这些提示
Use @python-fastapi-development to scaffold a new FastAPI project with SQLAlchemy and JWT authentication.
Use @python-fastapi-development to set up SQLAlchemy models for a user authentication system with PostgreSQL.
Use @python-fastapi-development to create RESTful API endpoints with CRUD operations for a items resource.
Use @python-fastapi-development to build a complete FastAPI application with authentication, database, testing, and Docker deployment.
最佳实践
- 使用 SQLAlchemy 2.0 的异步模式以获得更好的性能
- 始终使用 Pydantic 模型验证输入
- 使用自定义异常实现正确的错误处理
避免
- 不要跳过类型提示 - 它们可以提高代码可维护性
- 不要在异步端点中使用同步数据库调用
- 不要在代码中存储密钥 - 使用环境变量
常见问题
此技能支持什么版本的 FastAPI?
此技能会为我写代码吗?
我可以将此技能与其他数据库一起使用吗?
涵盖哪些身份验证方法?
是否包含 Docker 部署?
Claude Code 可以使用此技能吗?
开发者详情
作者
sickn33许可证
MIT
仓库
https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/python-fastapi-development引用
main
文件结构
📄 SKILL.md