def __init__(self,
context=None,
httpd=None,
route=None,
routes=None,
check=False):
"""
Serves web requests
:param context: global context for this process
:type context: Context
:param httpd: actual WSGI server
:param route: a route to add to this instance
:type route: Route
:param routes: multiple routes to add to this instance
:type routes: list of Route
:param check: True to check configuration settings
:type check: bool
"""
self.context = Context() if context is None else context
self.httpd = Bottle() if httpd is None else httpd
self._routes = {}
if route is not None:
self.add_route(route)
if routes is not None:
self.add_routes(routes)
if check:
self.configure()
评论列表
文章目录