Agent skill · software engineering · yonatangross

python-backend

Async Python runtime patterns: asyncio TaskGroup, FastAPI dependencies and middleware, SQLAlchemy 2.0 async sessions, pool tuning. Use when building async services. Not for the API contract (use api-design).

Why this skill is useful

Provides specific async patterns and database connection tuning for FastAPI and SQLAlchemy that the AI wouldn't reliably generate on its own.

What it needs

Requires python installed locally. About 5k tokens when loaded. Last updated 2026-08-06. 215 stars on the source repository.

What this skill does

<!-- directive-density: intentional (teaches asyncio/SQLAlchemy anti-patterns; NEVER markers describe real event-loop/race-condition bugs, not aspirational guidance) --> Python Backend Patterns for building production Python backends with asyncio, FastAPI, SQLAlchemy 2.0, and connection pooling. Each category has individual rule files in rules/ loaded on-demand. Quick Reference Category Rules Impact When to Use ---------- ------- -------- ------------- Asyncio 3 HIGH TaskGroup, structured concurrency, cancellation handling FastAPI 3 HIGH Dependencies, middleware, background tasks SQLAlchemy 3 HIGH Async sessions, relationships, migrations Pooling 3 MEDIUM Database pools, HTTP sessions, tuning Total: 12 rules across 4 categories. House decisions rescued from thinned files live in references/ork-delta.md; vendor material is linked, not restated (see Upstream coverage). Quick Start Asyncio Modern Python asyncio patterns using structured concurrency, TaskGroup, and Python 3.11+ features. Key Patterns TaskGroup replaces gather() with structured concurrency and auto-cancellation asyncio.timeout() context manager for composable timeouts Semaphore for concurrency limiting (rate-limit HTTP requests) except with ExceptionGroup for handling multiple task failures asyncio.tothread() for bridging sync code to async Key Decisions Decision Recommendation ---------- ---------------- Task spawning TaskGroup not gather() Timeouts asyncio.timeout() context manager Concurrency limit asyncio.Semaphore Sync bridge asyncio.tothread() Cancellation Always re-raise CancelledError FastAPI Production-ready FastAPI patterns for lifespan, dependencies, middleware, and settings. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills yonatangross/python-backend--480dbc

View the source on GitHub

Browse the @skills marketplace