Skip to content

pylerAI/async-throttle-optimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Async throttle optimizer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages