tartaruga ratelimiter
Project description
tartaruga
Tartaruga is another ratelimiter library, based on Redis. It allows for distributed rate-limiting accross different processess, or even hosts.
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Prerequisites
Python 3.x, PIP, Redis server up and running
Installing
Library can be installed simply with pip:
pip install tartaruga
or by running:
make install
Usage examples
Example usage. Ratelimiting 10 requests per second + 120 requests per minute + 240 requests per hour:
from tartaruga.ratelimiter import rate_limit
limits = [(1, 10), (60, 120), (3600, 240)]
@rate_limit(api_id='MyShinyAPI', limits=limits)
def somefunction():
# here you can call the API
Contributing
TBD
Authors
- **Devmons s.r.o. - Initial work - crypkit
License
Commercial
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
tartaruga-0.0.5.tar.gz
(3.4 kB
view details)
Built Distribution
File details
Details for the file tartaruga-0.0.5.tar.gz
.
File metadata
- Download URL: tartaruga-0.0.5.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5c9d0b3ebc634f1d783c68bcaea8da56819f0b109f733045c15bcac312be181 |
|
MD5 | 08e459e49929222b1a71254cf0e3ea12 |
|
BLAKE2b-256 | 335221994c92b94e98e3a150fc0f8abe9b0e00c982e7dd023993da7dbc380f5d |
File details
Details for the file tartaruga-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: tartaruga-0.0.5-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4db1a27ed5684d4ac4b47345faad14da1508d1bb7e3ab029b312d0dd2fa855c6 |
|
MD5 | b1d9df3784f4384f5c72a902bf9f9b85 |
|
BLAKE2b-256 | cc0515d7e2b1129affcd0e3340cdf712c595a7c9ac55bba3826b3ba662144590 |