Throttle your API calls
Project description
throttle-it 
Throttle your API calls
Installation
pip install throttle-it
Usage
from throttle_it import throttle, Duration
from requests import Session
@throttle(
Duration.MINUTE,
limit_header_name="X-RateLimit-Limit",
remaining_header_name="X-RateLimit-Remaining",
reset_header_name="X-RateLimit-Reset",
)
def get(session: Session, ...):
return session.get(...)
Development
Install dev dependencies
pip install ".[dev]"
Run pre-commits
uv tool run pre-commit install
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
throttle_it-0.1.0.tar.gz
(119.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file throttle_it-0.1.0.tar.gz.
File metadata
- Download URL: throttle_it-0.1.0.tar.gz
- Upload date:
- Size: 119.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4de53ec93c366e7c76b48ce4b97210cf92e3dcd9be3fda6e68ef06f160807290
|
|
| MD5 |
58c75f1839a2e6a4a899289e00faf55c
|
|
| BLAKE2b-256 |
7541762aa23a878335dff041274bbbc36e5cf88c9596e3bfd8b309a07acebf65
|
File details
Details for the file throttle_it-0.1.0-py3-none-any.whl.
File metadata
- Download URL: throttle_it-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31e2437fb103a5a5d36cc8fda1b9d06ef8f7e656ee06f53a80dbc46de256e0b8
|
|
| MD5 |
274fa95881a281428ac0ac3c912a6598
|
|
| BLAKE2b-256 |
0220f674bc03591056edc68bcbd06f635a1e478a4e71d01b7c392eef7f03d5e0
|