~/talk

"Asyncio by Example"

Talkat PyOhio 2024 · 2024-07-27..07-28· [python]
links:none on file
slides:none on file

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

  1. 0:00Asyncio basics
  2. 1:46Coroutines and futures
  3. 10:49Managing tasks
  4. 18:48Task groups and patterns
  5. 21:20Event loop internals
  6. 26:59Async HTTP example
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.