cherrypy._cpcheckker模块¶
CherryPy站点和已装载应用程序的检查器。
- class cherrypy._cpchecker.Checker[源代码]¶
基类:
object
CherryPy站点及其挂载应用程序的检查器。
当在引擎启动时调用此对象时,它将执行其自己的每个方法,这些方法的名称以
check_
。如果要禁用选定的检查,只需在全局配置中添加一行,将适当的方法设置为False::[global] checker.check_skipped_app_config = False
您还可以动态添加或替换
check_*
方法采用这种方式。- deprecated = {}¶
- extra_config_namespaces = []¶
- global_config_contained_paths = False¶
- known_config_types = {'engine.__class__': <class 'type'>, 'engine.__dict__': <class 'dict'>, 'engine.__doc__': <class 'str'>, 'engine.__module__': <class 'str'>, 'engine._priorities': <class 'dict'>, 'engine.events': <class 'dict'>, 'engine.execv': <class 'bool'>, 'engine.listeners': <class 'dict'>, 'engine.max_cloexec_files': <class 'int'>, 'log.__class__': <class 'type'>, 'log.__dict__': <class 'dict'>, 'log.__doc__': <class 'str'>, 'log.__module__': <class 'str'>, 'log.access_file': <class 'str'>, 'log.access_log_format': <class 'str'>, 'log.error_file': <class 'str'>, 'log.logger_root': <class 'str'>, 'log.screen': <class 'bool'>, 'log.wsgi': <class 'bool'>, 'request.__attrname__': <class 'str'>, 'request.__class__': <class 'type'>, 'request.__dict__': <class 'dict'>, 'request.__module__': <class 'str'>, 'request.__slots__': <class 'list'>, 'request.base': <class 'str'>, 'request.closed': <class 'bool'>, 'request.error_page': <class 'dict'>, 'request.header_list': <class 'list'>, 'request.method': <class 'str'>, 'request.methods_with_bodies': <class 'tuple'>, 'request.params': <class 'dict'>, 'request.path_info': <class 'str'>, 'request.process_request_body': <class 'bool'>, 'request.protocol': <class 'tuple'>, 'request.query_string': <class 'str'>, 'request.query_string_encoding': <class 'str'>, 'request.request_line': <class 'str'>, 'request.scheme': <class 'str'>, 'request.script_name': <class 'str'>, 'request.server_protocol': <class 'str'>, 'request.show_mismatched_params': <class 'bool'>, 'request.show_tracebacks': <class 'bool'>, 'request.throw_errors': <class 'bool'>, 'request.throws': <class 'tuple'>, 'request.toolmaps': <class 'dict'>, 'response.__attrname__': <class 'str'>, 'response.__class__': <class 'type'>, 'response.__dict__': <class 'dict'>, 'response.__module__': <class 'str'>, 'response.__slots__': <class 'list'>, 'response._body': <class 'list'>, 'response.body': <class 'list'>, 'response.stream': <class 'bool'>, 'response.time': <class 'float'>, 'server.__class__': <class 'type'>, 'server.__dict__': <class 'dict'>, 'server.__doc__': <class 'str'>, 'server.__module__': <class 'str'>, 'server._socket_host': <class 'str'>, 'server.accepted_queue_size': <class 'int'>, 'server.accepted_queue_timeout': <class 'int'>, 'server.bind_addr': <class 'tuple'>, 'server.bound_addr': <class 'tuple'>, 'server.description': <class 'str'>, 'server.max_request_body_size': <class 'int'>, 'server.max_request_header_size': <class 'int'>, 'server.nodelay': <class 'bool'>, 'server.peercreds': <class 'bool'>, 'server.peercreds_resolve': <class 'bool'>, 'server.protocol_version': <class 'str'>, 'server.running': <class 'bool'>, 'server.shutdown_timeout': <class 'int'>, 'server.socket_host': <class 'str'>, 'server.socket_port': <class 'int'>, 'server.socket_queue_size': <class 'int'>, 'server.socket_timeout': <class 'int'>, 'server.ssl_module': <class 'str'>, 'server.statistics': <class 'bool'>, 'server.thread_pool': <class 'int'>, 'server.thread_pool_max': <class 'int'>, 'server.wsgi_version': <class 'tuple'>}¶
- obsolete = {'log_access_file': 'log.access_file', 'log_config_options': None, 'log_file': 'log.error_file', 'log_file_not_found': None, 'log_request_headers': 'tools.log_headers.on', 'log_to_screen': 'log.screen', 'profiler.on': 'cherrypy.tree.mount(profiler.make_app(cherrypy.Application(Root())))', 'server.default_content_type': 'tools.response_headers.headers', 'show_tracebacks': 'request.show_tracebacks', 'throw_errors': 'request.throw_errors'}¶
- on = True¶
如果为True(默认值),则运行所有检查;如果为False,则关闭所有检查。