~/talk

TUTORIAL: Async Python, Good it is

Talkat Python Web Conf 2023 · 2023-03-13..03-17· [python, concurrency]
slides:none on file

Shows runnable code on GitHub using Python’s built-in async IO (since 3.4, tested on 3.8–3.11) to prove async/await works for I/O-bound tasks: prints “hello” then “world,” uses asyncio.run once early to start the event loop, launches concurrent jobs with asyncio.gather and create_task, demonstrates timeout with asyncio.wait and cancellation, and shows “first completed” handling. Emphasizes async is not for CPU-bound work and warns against calling async from sync code repeatedly; demos work live.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 2:19Why use asynchrony
  3. 6:33Python async strategies
  4. 9:21Async IO basics
  5. 12:33Async IO for I/O workloads
  6. 15:51Async and await keywords
  7. 25:09Mixing async with sync code
  8. 31:19Running tasks in parallel
  9. 39:58Async IO gather method
  10. 51:38Timeout and cancel tasks
  11. 1:05:59Wait for first result
  12. 1:13:30Edge cases and cleanup
  13. 1:17:26Resources and Q&A
~/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.