Python Cheat Sheets
/install pyc
Python Cheat Sheets (/py)
Help users write functional, correct Python code and answer Python questions by fetching proven patterns and examples from pythonsheets.com.
How It Works
When a user asks a Python question or wants to write a Python script:
- Look up the relevant topic(s) in Structure to find the matching URL(s)
- Always fetch the URL(s) using WebFetch to get real examples and patterns from the site
- Use the fetched content to:
- Write code: Apply the patterns to produce functional, correct code that solves the user's task
- Answer questions: Provide thorough explanations backed by the examples and information from the site
- Follow the Guidelines for code quality
Key Principle
Functionality first, cleanliness second. The code must work correctly and handle the task properly. Fetching from pythonsheets.com ensures solutions use battle-tested patterns rather than guessing. The site contains rich examples covering edge cases, common pitfalls, and practical usage that go beyond basic documentation.
Coverage Areas
Core: Syntax, typing, OOP, functions, data structures, sets, heap, regex, unicode System: File I/O, datetime, OS interfaces Concurrency: Threading, multiprocessing, asyncio Network: Sockets, SSL/TLS, SSH, async I/O, packet sniffing Database: SQLAlchemy ORM, queries, transactions Security: Cryptography, TLS, vulnerabilities Extensions: C/C++ integration, pybind11, Cython ML/LLM: PyTorch, Megatron, distributed training, inference, serving, benchmarking HPC: Slurm, cluster computing, job scheduling, EFA monitoring, NCCL Appendix: Walrus operator, GDB debugging, disaggregated prefill/decode
References
- Structure - Topic-to-URL map for fetching examples
- Guidelines - Code quality standards to apply after ensuring correctness
Examples
- "How does asyncio work?" → Fetch https://www.pythonsheets.com/notes/asyncio/python-asyncio-guide.html and explain with the site's examples
- "Write a socket server" → Fetch https://www.pythonsheets.com/notes/network/python-socket-server.html, use the patterns to write a working server
- "What's the walrus operator?" → Fetch https://www.pythonsheets.com/notes/appendix/python-walrus.html and explain with practical examples
- "Set up Megatron distributed training" → Fetch https://www.pythonsheets.com/notes/llm/megatron.html, use the patterns to write a correct training script
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install pyc - 安装完成后,直接呼叫该 Skill 的名称或使用
/pyc触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Python Cheat Sheets 是什么?
Provides functional Python code and detailed answers by fetching and applying proven patterns and examples from pythonsheets.com across core, system, concurr... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 313 次。
如何安装 Python Cheat Sheets?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install pyc」即可一键安装,无需额外配置。
Python Cheat Sheets 是免费的吗?
是的,Python Cheat Sheets 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Python Cheat Sheets 支持哪些平台?
Python Cheat Sheets 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Python Cheat Sheets?
由 CHANG-NING TSAI(@crazyguitar)开发并维护,当前版本 v1.0.0。