python
Installation
SKILL.md
Python Workflow
Use this skill when working on Python projects or adding Python support.
Tooling baseline
- Use
uvfor environments, dependency management, and running commands. - Prefer Astral tooling for quality gates:
rufffor lint/format andtyfor type checking. - Favor strict typing everywhere; avoid
Anyunless the boundary truly requires it.
Typing and schemas
- Type every function signature (params + return) and keep types narrow.
- Use Pydantic models for inputs, outputs, and configuration schemas.
- Prefer typed collections and
typing_extensionsfor newer typing features.
Testing
- Write tests with
pytestand property tests withhypothesiswhen behavior is stateful or rule-based. - Add coverage checks (e.g., pytest-cov) and keep coverage green for new code paths.