Limiter - in Utility Submodule: Functions and Classes#
This module provides a mixture of helpers to support rate limiting and also functions for conversion?
TODO: look into whether total_seconds relates to limiter actions or unit conversion
Summary Functions#
|
Alternative to datetime.timedelta.total_seconds total_seconds() only available since Python 2.7 https://docs.python.org/2/library/datetime.html#datetime.timedelta.total_seconds |
|
Returns a namedtuple with values for short - and long usage and limit rates found in provided HTTP response headers :param headers: HTTP response headers :type headers: dict :return: namedtuple with request rates or None if no rate-limit headers present in response. |
Returns the number of seconds until the next quarter of an hour. |
|
|
Returns the number of seconds until the next day (utc midnight). |
Summary Classes#
|
|
|
A rate limit rule that can be prioritized and can dynamically adapt its limits based on API responses. |
|
|
Implements something similar to the default rate limit for Strava apps. |