- 对所有函数参数和返回值使用类型提示
- 使用 Pydantic 实现适当的输入验证
- 对长时间运行的操作使用 FastAPI 的后台任务
- 实现适当的 CORS 处理
- 使用 FastAPI 的安全工具进行认证
- 遵循 Python 代码的 PEP 8 风格指南
- 实现全面的单元和集成测试
Fastapi Python General Coding Standards
应用一般 Python 编码标准,包括类型提示、使用 Pydantic 进行输入验证、后台任务、CORS 处理、安全工具、PEP 8 合规性和全面测试。
Fastapi Python General Coding Standards by liaosw97 · c54f50d
npx skillmds@latest add liaosw97/fastapi-python-general-coding-standards File contents
---name: fastapi-python-general-coding-standardsdescription: 应用一般 Python 编码标准,包括类型提示、使用 Pydantic 进行输入验证、后台任务、CORS 处理、安全工具、PEP 8 合规性和全面测试。---- 对所有函数参数和返回值使用类型提示- 使用 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
Run npx skillmds@latest add liaosw97/fastapi-python-general-coding-standards in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
应用一般 Python 编码标准,包括类型提示、使用 Pydantic 进行输入验证、后台任务、CORS 处理、安全工具、PEP 8 合规性和全面测试。 It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
liaosw97 (@liaosw97) published this skill. Their other Agent Skills are listed on their SkillMD profile.