Python Cheatsheet 06 — uv Packaging and Workflow
Cheatsheet: uv init, uv add, uv sync, uv lock, uv run, uv build, uv publish.
Cheatsheet: uv init, uv add, uv sync, uv lock, uv run, uv build, uv publish.
Cheatsheet: tenant context, RLS policies, per-request session, isolation tests.
Cheatsheet: when branches form, alembic merge, single-head CI gate, recovery.
Cheatsheet: custom types via Annotated, GetCoreSchemaHandler, RootModel, TypeAdapter, dataclass integration.
Cheatsheet: session.begin, begin_nested, isolation levels, with_for_update, optimistic locking, deadlock retry.
Multi-DB migrations via Alembic: -t multidb template, schema-per-tenant strategies, parallelism.
Custom types via Annotated, RootModel for primitive-typed root, TypeAdapter for arbitrary types, dataclass integration.
Relationship() in depth: configuration, loading strategies, N+1 prevention, association tables, polymorphic patterns.
Cheatsheet: pytest basics, fixtures, parametrize, marks, conftest, pytest-asyncio.
Cheatsheet: enqueue from request, worker with DB session, outbox + LISTEN/NOTIFY wake-up.