Getting Started#

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(...)

For full documentation of @throttle go to API Reference