[docs]classLeakyBucket(BaseRateBucket):"""Bucket whose refill strategy follows the leaky bucket algorithm. Only one request can get executed every ``delay`` seconds. """
[docs]def__init__(self,delay:float,**kwargs:Any)->None:""" Args: delay: The delay before a new request can pass through. """super().__init__(capacity=math.inf,delay=delay,**kwargs)self._can_pass_through=True