# Ready when a timer finishes await asyncio.sleep(1) # Ready when network packets return await client.get("http://example.com") # Ready when the coroutine exits await my_function("hello", 64.2)
async def calculate(x): result = await coroutine(x) return result # These both return a coroutine def calculate(x): result = coroutine(x) return result
Parallel Queries After all, we're the experts in fetching data Notifications & Events Polling will absolutely wreck your servers Microservices / API aggregation It's a lot quicker to call those 10 things in parallel