django.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:bucket_throttling 作者: atten 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号