http_handler.py 文件源码

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

项目:pyterrier 作者: dfurtado 项目源码 文件源码
def __init__(self,
                 route_table: Dict[str, Tuple[str, Any]],
                 config: Dict[str, str],
                 renderer, *args: Any) -> None:
        """
        Create a new request handler.
        :param route_table: A dict with route information, the key is the route
        as string and the value is a tuple containing the http verb and the
        action to be executed when the route is requested.
        """

        self._route_table = route_table
        self._resolver = RouteResolver(route_table)
        self._config = config
        self._renderer = renderer

        self._static_regex = re.compile('[/\w\-\.\_]+(?P<ext>\.\w{,4})$',
                                        re.IGNORECASE | re.DOTALL)

        BaseHTTPRequestHandler.__init__(self, *args)

        mimetypes.init()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号