INNER CODE UNIT · Python
decorator
laurentS/slowapi · slowapi/extension.py:667
def decorator(func: Callable[..., Response]):
keyfunc = key_func or self._key_func
name = f"{func.__module__}.{func.__name__}"
dynamic_limit = None
static_limits: List[Limit] = []
if callable(limit_value):
dynamic_limit = LimitGroup(
limit_value,
keyfunc,
_scope,
per_method,
methods,
error_message,
exempt_when,
cost,
override_defaults,
)
else: