Fastapi Python General Coding Standards

应用一般 Python 编码标准,包括类型提示、使用 Pydantic 进行输入验证、后台任务、CORS 处理、安全工具、PEP 8 合规性和全面测试。

liaosw97 Updated

File contents

  • 对所有函数参数和返回值使用类型提示
  • 使用 Pydantic 实现适当的输入验证
  • 对长时间运行的操作使用 FastAPI 的后台任务
  • 实现适当的 CORS 处理
  • 使用 FastAPI 的安全工具进行认证
  • 遵循 Python 代码的 PEP 8 风格指南
  • 实现全面的单元和集成测试

liaosw97/awesome-rules-skills/tree/main/plugins/fastapi/skills/fastapi-python-general-coding-standards commit c54f50dad1

Frequently asked questions

npx skillmds@latest add liaosw97/fastapi-python-general-coding-standards