"Asyncio by Example"
summary
Covers async/await basics to practical patterns using Python's asyncio (running on 3.12.4) with live Jupyter demos: explains futures vs coroutines, how create_task wraps a coroutine into a future, use of ensure_future, cancellation of infinite loops, and pause points (await/async for/async with). Introduces TaskGroup cancels siblings and newer primitives like Barriers and ExceptionGroup. Builds an async httpx client against the PokéAPI to fetch multiple Pokémon concurrently and shows the code running correctly and faster than serial awaits.
AI-written summary · about
chapters (6)
- 0:00Asyncio basics
- 1:46Coroutines and futures
- 10:49Managing tasks
- 18:48Task groups and patterns
- 21:20Event loop internals
- 26:59Async HTTP example
related talks
31mA Really Gentle Introduction to Asyncio
29mWhat in the World is Asyncio?
01h 21mTUTORIAL: Async Python, Good it is
30mLet's get you started with asynchronous programming
23mPractical usage of asyncio
24mA Crash Course in Python 3's asyncio
50mUsing Asyncio in Python 3
01h 23mPython async/await unraveled
