def create_app(loop):
app = web.Application(loop=loop)
app["config"] = {"test": "foo"}
app.router.add_route('GET', '/', handle)
add_route(app, multiple_query_params)
add_route(app, multiply)
add_route(app, get_id)
add_route(app, header_response)
route(app, config)
route(app, get_optional)
route(app, body_and_header)
route(app, error)
route(app, api_exception)
# this should be at the end, to ensure all routes are considered when
# constructing the handler.
add_swagger(app, "/swagger.json", "/swagger")
return app
评论列表
文章目录