aiohttp set number of requests per second
问题 I'm writing an API in Flask with 1000+ requests to get data and I'd like to limit the number of requests per second. I tried with: conn = aiohttp.TCPConnector(limit_per_host=20) and conn = aiohttp.TCPConnector(limit=20) But is seems doesn't work My code looks like this: import logging import asyncio import aiohttp logging.basicConfig(filename="logfilename.log", level=logging.INFO, format='%(asctime)s %(levelname)s:%(message)s') async def fetch(session, url): async with session.get(url,