Async Python and Concurrency
Master Python concurrency — asyncio, threading, multiprocessing, and task orchestration for I/O-bound and CPU-bound workloads.
View badge details
About This Course
Course Curriculum
12 Lessons
The GIL Threads and Processes
AI-led teaching session covering concurrency vs parallelism, the GIL (what it is, what it prevents, why it exists), threading.Thread and shared state risks, thread safety with Lock and Queue, and ThreadPoolExecutor for I/O-bound tasks. Fictional company: StreamForge.
The GIL Threads and Processes - Lab Exercises
Concurrency vs parallelism, the GIL (what it is/prevents/why it exists), threading.Thread and shared state risks, thread safety with Lock and Queue, ThreadPoolExecutor for I/O-bound tasks
asyncio Fundamentals
AI-led teaching session covering event loop and single-threaded concurrency, async def and await, asyncio.create_task and gather/wait, awaitables (coroutines vs tasks vs futures), and common mistakes (forgetting await, blocking calls). Fictional company: StreamForge.
asyncio Fundamentals - Lab Exercises
Event loop and single-threaded concurrency, async def and await, asyncio.create_task and gather/wait, awaitables (coroutines vs tasks vs futures), common mistakes (forgetting await, blocking calls)
Async IO HTTP Files and Databases
AI-led teaching session covering aiohttp ClientSession and connection pooling, httpx AsyncClient for async HTTP, aiofiles for async file I/O, aiosqlite for async database, and mixing sync and async with asyncio.to_thread. Fictional company: StreamForge.
Async IO HTTP Files and Databases - Lab Exercises
aiohttp ClientSession and connection pooling, httpx AsyncClient for async HTTP, aiofiles for async file I/O, aiosqlite for async database, mixing sync and async with asyncio.to_thread
Task Orchestration and Patterns
AI-led teaching session covering semaphores for rate limiting, timeouts with wait_for and asyncio.timeout, error handling with return_exceptions and TaskGroup, producer/consumer with asyncio.Queue, and retry with exponential backoff and jitter. Fictional company: StreamForge.
Task Orchestration and Patterns - Lab Exercises
Semaphores for rate limiting, timeouts with wait_for and asyncio.timeout, error handling with return_exceptions and TaskGroup, producer/consumer with asyncio.Queue, retry with exponential backoff and jitter
multiprocessing for CPU-Bound Work
AI-led teaching session covering when to use multiprocessing vs async, ProcessPoolExecutor with map and submit, pickle constraints for cross-process data, shared state with Value and Queue, and decision tree (I/O-bound vs CPU-bound vs mixed). Fictional company: StreamForge.
multiprocessing for CPU-Bound Work - Lab Exercises
When to use multiprocessing vs async, ProcessPoolExecutor with map and submit, pickle constraints for cross-process data, shared state with Value and Queue, decision tree (I/O-bound vs CPU-bound vs mixed)
Capstone Briefing Concurrent Data Pipeline
AI-led capstone briefing covering the design and architecture of a concurrent data pipeline with async HTTP ingestion, producer/consumer queues, CPU-bound processing via ProcessPoolExecutor, error handling with timeouts and retries, and performance metrics. Fictional company: StreamForge.
Capstone Concurrent Data Pipeline
Capstone: build concurrent pipeline with async HTTP ingestion from 10 sources with rate limiting, producer/consumer queue with 3 async workers, CPU-bound processing via ProcessPoolExecutor, error handling with timeouts and retries, JSON output with performance metrics