def throttle_request(throttling_rules: [RuleList, ThrottlingRule],
throttling_arguments_func: Callable=None,
throttling_options: ThrottlingOptions=None) -> Callable:
"""
????????? ??? view-???????, ?????????? ?????????.
:param throttling_rules: ???? ????????? ThrottlingRule ??? ??????
:param throttling_arguments_func: ???????, ?? ??????? ??????????? ????? ?????????? ??? ???????.
???? ?? ??????, ??????? ?-?? ?? ?????????.
:param throttling_options: ????????? ThrottlingOptions, ???? ????? ????????? ?????????.
"""
def decorator(func):
func.throttling_rules = throttling_rules
func.throttling_arguments_func = throttling_arguments_func
func.throttling_options = throttling_options
return func
return decorator
评论列表
文章目录