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:

  1. PEP 695 Syntax (Python 3.12+) → Use type Alias = ... and generic functions def func[T](...); ban legacy TypeVar and typing.Union
  2. Structured Concurrency (asyncio.TaskGroup) → Use async with asyncio.TaskGroup() as tg: for parallel task execution; avoid raw asyncio.gather() error leaks
  3. Pydantic v2 Validation → Use model_dump(), model_dump_json(), model_validate(), and @field_validator; ban v1 .dict() and @validator
  4. Non-Blocking Async Clients → Use httpx.AsyncClient() in async code; ban blocking requests library 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.

2026 Python 3.12+ Performance & Logic Invariants

Installs
3
GitHub Stars
7
First Seen
Apr 26, 2026