Python asyncio and await Cheat Sheet
Write structured asynchronous Python with coroutines, tasks, task groups, timeouts, cancellation, queues, synchronization, and safe blocking-work delegation.
Open cheat sheetPython · 10 guides
Coordinate parallel work, network services, databases, memory, and performance.
Focused references
Each guide includes copy-ready syntax, detailed examples, and authoritative references.
Write structured asynchronous Python with coroutines, tasks, task groups, timeouts, cancellation, queues, synchronization, and safe blocking-work delegation.
Open cheat sheetCoordinate parallel Python work with thread, process, and interpreter executors, futures, ordered maps, completion handling, timeouts, and cancellation.
Open cheat sheetUse Python hashlib, hmac, and secrets correctly for digests, message authentication, secure tokens, password derivation, and constant-time verification.
Open cheat sheetDiagnose Python memory with reference ownership, cyclic garbage collection, weak references, finalizers, tracemalloc snapshots, and practical leak investigation.
Open cheat sheetBuild reliable Python process workers with start methods, pools, queues, pipes, synchronization, managers, shared memory, and safe shutdown.
Open cheat sheetMeasure Python performance responsibly with timeit, cProfile, pstats, tracemalloc, trace hooks, sampling principles, and repeatable experiments.
Open cheat sheetBuild robust Python TCP and UDP clients and servers with address resolution, framing, timeouts, non-blocking sockets, selectors, and safe cleanup.
Open cheat sheetBuild reliable embedded databases with Python sqlite3 connections, parameter binding, transactions, constraints, row factories, savepoints, and online backups.
Open cheat sheetCoordinate Python threads safely with locks, conditions, events, semaphores, barriers, queues, cancellation, and reliable shutdown patterns.
Open cheat sheetBuild standard-library HTTP clients with urllib: requests, query strings, form bodies, headers, timeouts, TLS, errors, proxies, redirects, and safe URL validation.
Open cheat sheet