Base class for rate limiters.
Usage of the base limiter is through the acquire and aacquire methods depending on whether running in a sync or async context.
Implementations are free to add a timeout parameter to their initialize method to allow users to specify a timeout for acquiring the necessary tokens when using a blocking call.
Current limitations:
BaseRateLimiter()abc.ABCAttempt to acquire the necessary tokens for the rate limiter.
This method blocks until the required tokens are available if blocking
is set to True.
If blocking is set to False, the method will immediately return the result
of the attempt to acquire the tokens.
Attempt to acquire the necessary tokens for the rate limiter.
This method blocks until the required tokens are available if blocking
is set to True.
If blocking is set to False, the method will immediately return the result
of the attempt to acquire the tokens.