Async implementation of a rate-limited lock object for Python 3.11.x
Project description
eko_throttler
Async implementation of a rate-limited lock object for Python 3.11.x
Info
Author: Drix Holway
Version: 0.2.0
Revision Date: 2023-07-18
Usage
The Throttler class requires a request limit int
value, and an interval timedelta
value on initialisation. These values dictate how the rate limiting will occur when a lock is acquired.
from datetime import timedelta
from eko_throttler import Throttler
async def main():
throttler = Throttler(
10,
timedelta(seconds=1),
)
async with throttler:
# do something
Installation
Installation of eko_throttler
may be done using pip
.
pip install eko_throttler
License
Licensed under the [MIT](LICENSE) license.
Credits
Copyright (c) 2023 Ekoteq
Author: Drix Holway
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
eko_throttler-0.2.0.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for eko_throttler-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d761ab4c6d5e9e2eb7fde3cc98d94a09d2afbc22305b3f668f75841518d16525 |
|
MD5 | 71aa084f1cf35e61950341cf7ed435e2 |
|
BLAKE2b-256 | e1bae40d04334398b0e430cc74a67df05680fff2e21c3116ea3e1552118b6835 |