<< All versions

Skill v1.0.0

currentAutomated scan100/100
jxoesneon/ciel/python-development
──Details
PublishedSeptember 27, 2026 at 09:03 PM
Content Hashsha256:34eece1180806586...
Git SHA0a73bb6da1f0
──Files
Files (1 file, 1.6 KB)
SKILL.md1.6 KBactive
SKILL.md · 39 lines · 1.6 KB

version: "1.0.0" name: python-development description: Idiomatic Python patterns, modern type hints, and pytest-driven development. license: MIT metadata: ciel-version: 1.0.0 ciel-extension: ciel.yaml


CIEL ADAPTATION: Python Development (Idiomatic & Typed)

This skill formalizes the "Modern Python" layer. it prioritizes readability (Zen of Python), explicit type hints, and EAFP error handling.

Idiomatic Standards

  1. Zen Compliance: Readability over cleverness. Explicit over implicit.
  2. Type Hints (3.9+): Annotate all public functions using built-in generics (e.g., list[str]).
  3. Error Handling: Follow EAFP (Easier to Ask Forgiveness). Use try/except for expected errors.
  4. Resource Management: ALWAYS use with statements (Context Managers) for I/O.

Modern Patterns

  • Data Containers: Use @dataclass for mutable state and NamedTuple for immutable state.
  • Lazy Eval: Prefer Generator Expressions over large List Comprehensions for memory efficiency.
  • Validation: Use Pydantic (v2) for strict runtime data validation and parsing.

Testing (pytest)

  • TDD: Write failing tests first. 80% coverage target.
  • Fixtures: Use yield fixtures for setup/teardown. Avoid manual cleanup logic in tests.
  • Mocking: Use @patch for external I/O. Prefer autospec=True to catch API misuse.

Anti-Patterns

  • Mutable Defaults: Using def foo(x=[]). Use None and initialize inside the function.
  • Bare Except: Catching all exceptions (except:) instead of specific classes.
  • Clever Comprehensions: Writing 3-line list comprehensions that are unreadable.
All versions