Skip to main content

Throttle your API calls

Project description

Python Version from PEP 621 TOML

throttle-it throttle-it website

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

throttle_it-0.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

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

Hashes for throttle_it-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4de53ec93c366e7c76b48ce4b97210cf92e3dcd9be3fda6e68ef06f160807290
MD5 58c75f1839a2e6a4a899289e00faf55c
BLAKE2b-256 7541762aa23a878335dff041274bbbc36e5cf88c9596e3bfd8b309a07acebf65

See more details on using hashes here.

File details

Details for the file throttle_it-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for throttle_it-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31e2437fb103a5a5d36cc8fda1b9d06ef8f7e656ee06f53a80dbc46de256e0b8
MD5 274fa95881a281428ac0ac3c912a6598
BLAKE2b-256 0220f674bc03591056edc68bcbd06f635a1e478a4e71d01b7c392eef7f03d5e0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page