Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 449 Bytes

README.md

File metadata and controls

26 lines (17 loc) · 449 Bytes

async_throttle_optimizer

A library to optimize the request rate for async requests.

Installation

pip install async-throttle-optimizer

Usage

from async_throttle_optimizer.throttler import RequestThrottler

async def main():
    urls = ["https://example.com/api/v1/data"] * 100
    throttler = RequestThrottler(urls, rate=5, concurrency=2)
    await throttler.run()

asyncio.run(main())

License

MIT License