LogoClawIndex
CasesSkillsAbout
LogoClawIndex

python-patterns - Python Design Patterns and Best Practices Guide

Provides Python design patterns and best practices including protocols, dataclasses, context managers, decorators, async/await, and type hints.

Tags

Updated: 2026-09-20
pythondesign-patternsbest-practicestype-hintsasyncdataclassescontext-managersdecorators

Capabilities

Implement structural subtyping with protocolsDefine data transfer objects with dataclassesManage resources using context managersProcess data lazily using generators

Typical Inputs

Python source codePython type stub files

Typical Outputs

Pythonic code structuresRefactored Python codeType-safe Python modules

What this skill does

  • Implement structural subtyping with protocols
  • Define data transfer objects with dataclasses
  • Manage resources using context managers
  • Process data lazily using generators
  • Apply function and class decorators
  • Execute concurrent tasks with async/await
  • Annotate code using advanced type hints
  • Implement constructor dependency injection
  • Structure packages and module exports
  • Handle errors using custom exceptions
  • Define object properties with property decorators
  • Compose functions using higher-order functions

Inputs

  • Python source code
  • Python type stub files

Outputs

  • Pythonic code structures
  • Refactored Python code
  • Type-safe Python modules

Requirements

  • Python 3.10 or higher for union types and match statements
  • Python 3.11 or higher for exception groups

Source

  • Spec: SKILL.md

ClawIndex

OpenClaw Skills & Use Case Index

ClawIndex is an ecosystem-driven index of OpenClaw skills and real-world use cases.

Index

Skills·
Cases

Meta

About·
Disclaimer·
Email·
GitHub
© 2026 ClawIndex All Rights Reserved.