Let's get you started with asynchronous programming
summary
Claims that async is practical not mystical and shows working code using Python 3.12 (back to 3.7+), aiohttp and the standard asyncio.gather pattern with sessions and per‑host limits. Builds a content‑warning pipeline that fetches video and transcript, runs a CPU model via loop.run_in_executor, and patches results back. Initial naive async run drops 100‑video time from 3m26s synchronous to 1m22s then to 13s after adding semaphores, connection limits and offloading CPU work. IPython/Jupyter and FastAPI behavior details are shown.
AI-written summary · about
chapters (11)
- 0:00Async programming intro
- 1:07What is async programming
- 3:11Asyncio in Python
- 7:45Coroutines and event loops
- 10:12Running async code
- 13:03Concurrent execution with gather
- 15:11Content warning service
- 20:56Fixing async mistakes
- 24:03Optimizing with semaphores
- 25:34CPU-bound tasks in async
- 27:22Q&A
related talks
01h 21mTUTORIAL: Async Python, Good it is
30m"Asyncio by Example"
24mA Crash Course in Python 3's asyncio
31mA Really Gentle Introduction to Asyncio
56mLeveraging Async and Await in Modern Python
32mDemystifying AsyncIO: Building Your Own Event Loop in Python
27m"Python’s tale of concurrency"
34mA practical guide to speed up your application with Asyncio
