MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / get_app

Function get_app

pywebio/platform/path_deploy.py:324–334  ·  view source on GitHub ↗
(context: TornadoHttpContext)

Source from the content-addressed store, hash-verified

322 index_func = {True: partial(default_index_page, base=abs_base), False: lambda p: '403 Forbidden'}.get(index, index)
323
324 def get_app(context: TornadoHttpContext):
325 reload = context.request_url_parameter('reload', None) is not None
326
327 type, res = get_app_from_path(context.get_path(), abs_base, index=index_func, reload=reload)
328 if type == 'error':
329 raise tornado.web.HTTPError(status_code=res)
330 elif type == 'html':
331 raise tornado.web.Finish(res)
332
333 app_name = context.request_url_parameter('app', 'index')
334 return res.get(app_name) or res['index']
335
336 class HttpPathDeployHandler(HttpHandler):
337 def get_cdn(self, context):

Callers

nothing calls this directly

Calls 4

get_app_from_pathFunction · 0.85
get_pathMethod · 0.80
request_url_parameterMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…