| Crates.io | cleanpy |
| lib.rs | cleanpy |
| version | 0.1.3 |
| created_at | 2025-10-13 14:57:44.251341+00 |
| updated_at | 2025-10-15 17:22:36.944958+00 |
| description | Python 3.12+ 最佳实践知识库 - MCP 服务器 |
| homepage | |
| repository | https://github.com/schwartx/cleanpy |
| max_upload_size | |
| id | 1880635 |
| size | 119,969 |
Python 3.12+ 最佳实践知识库 - MCP 服务器 + Claude Code 集成
为 AI 编程助手提供 33+ 个主题的中文文档,涵盖现代 Python 工具链(UV、Ruff、Basedpyright、Pytest)。通过 Rust 实现的零开销 MCP 服务器和专用 Claude Code 集成。
/py 命令实现自动化代码质量流程9 个类别,33+ 篇文档:
cargo build --release
cargo install --path .
# 使用 claude mcp 命令
claude mcp add -s project cleanpy cleanpy mcp
cleanpy install # 项目级 (.claude/)
cleanpy install --scope local # 用户级 (~/.claude/)
安装内容:
commands/py.md - /py 斜杠命令agents/python-implementer.md - Python 实现专家agents/python-checker.md - 代码质量检查器建议安装类 sequential-thinking 的思考链 MCP 服务器(如 sequential-thinking、reasoning 等)以增强复杂问题的推理能力。
# 列出所有主题
mcp__cleanpy__list_topics
# 获取特定主题文档
mcp__cleanpy__get_tips("asyncio_basics")
/py 实现异步 HTTP 下载器,支持并发和进度显示
工作流程:查询最佳实践 → 实现代码 → Ruff 检查/格式化 → Basedpyright 类型检查
src/python312_best_practices/XX_类别/ 创建 .md 文件---
topic: topic_id
title: 标题
when_to_use: 使用场景
keywords: [关键词1, 关键词2]
---
cargo build(build.rs 自动生成索引)