Location via proxy:   
[Report a bug]   [Manage cookies]                

I write about software development, cloud infrastructure, and related stuff in the life of a software engineer.


Asyncio: Limiting Concurrency With Batches

Exploring how to to write Python programs that leverage concurrency, but without stressing other components, like external APIs or other micro services. Using asyncio.gather() and itertools.batched() data can be processed in batches of fixed size, allowing us to find the right balance between performance, system load and other constraints.