Python Cheatsheet 01 — asyncio Essentials
Cheatsheet: async/await basics, asyncio.run, gather vs TaskGroup, timeouts, cancellation.
Cheatsheet: async/await basics, asyncio.run, gather vs TaskGroup, timeouts, cancellation.
Cheatsheet: directory layout, pyproject, lifespan, db / settings / models / api wiring.
Cheatsheet: alembic init, env.py wiring for SQLAlchemy 2.0, async env.py, naming conventions.
Cheatsheet: BaseModel definition, model_validate, model_dump, model_config.
Cheatsheet: create_engine / create_async_engine, pool params, pre-ping, recycle, events, lifespan integration.
Alembic basics: setup with SQLAlchemy 2.0, env.py for sync/async, naming conventions, the migration directory.
Pydantic v2 mental model: validation (input → model), serialization (model → output), the Rust core, and what changed from v1.
SQLAlchemy 2.0 introduction: Core vs ORM, the unified API, engine + connection, basic select / insert / update / delete.
Cheatsheet: X | None syntax, generics, Protocol, TypedDict, ParamSpec, type guards.
Cheatsheet: trace a request from socket to response through all four libraries.