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: async def vs def, AnyIO/TaskGroup, to_thread, blocking traps, semaphores, timeouts, cancellation.
Cheatsheet: AsyncEngine, AsyncSession, lazy loading caveats, streaming results, run_sync escape hatch.
Concurrency in FastAPI: async vs sync handlers, the threadpool, AnyIO, blocking traps, structured concurrency, and how to scale.
Async patterns in SQLAlchemy 2.0: AsyncSession, expire_on_commit, async streaming, lazy loading caveats, AsyncSession scopes.
Cheatsheet: async views, sync_to_async, async ORM, middleware async.
Cheatsheet: Promise.all/allSettled, retries, timeouts, AbortController, queues.
Practical Django async ORM: aget / acreate / aupdate, transaction.atomic in async, async-safe context, and migration from sync code.
Practical Rust async traits: AFIT (async fn in traits), trait_variant for Send bounds, dyn-compatibility, and where async-trait crate still earns its keep.
Practical Python async: TaskGroup for structured concurrency, asyncio.timeout, gather pitfalls, anyio for portability, and how to avoid lost exceptions.