python-pro
Installation
SKILL.md
Python 3.12+ — Dense Reference
Mandatory Pre-Flight Context Inspection
Before writing Python code or FastAPI endpoints, you MUST inspect:
- PEP 695 Syntax (Python 3.12+) → Use
type Alias = ...and generic functionsdef func[T](...); ban legacyTypeVarandtyping.Union - Structured Concurrency (
asyncio.TaskGroup) → Useasync with asyncio.TaskGroup() as tg:for parallel task execution; avoid rawasyncio.gather()error leaks - Pydantic v2 Validation → Use
model_dump(),model_dump_json(),model_validate(), and@field_validator; ban v1.dict()and@validator - Non-Blocking Async Clients → Use
httpx.AsyncClient()in async code; ban blockingrequestslibrary inside asyncio event loops
Activation Boundaries
- Activate when: Building Python 3.12+ APIs (FastAPI, Litestar, Django), asyncio pipelines, Pydantic v2 schemas, data processing, and pytest suites.
- DO NOT activate when: Writing frontend TypeScript/JavaScript, or low-level C++/Rust code.