Let\'s assume we have a bunch of links to download and each of the link may take a different amount of time to download. And I\'m allowed to download using utmost 3 connecti
The asyncio-pool library does exactly what you need.
https://pypi.org/project/asyncio-pool/
LIST_OF_URLS = ("http://www.google.com", "......") pool = AioPool(size=3) await pool.map(your_download_coroutine, LIST_OF_URLS)