def text_response(): return http.HTMLResponse("Hello, world!")
def Return(return_value): if isinstance(return_value, str): return_value = http.HTMLResponse(return_value) elif not isinstance(return_value, http.Response): return_value = http.JSONResponse(return_value) raise HookReturn(return_value)
def template_handler(app: App, name: str = None) -> http.HTMLResponse: return http.HTMLResponse(app.render_template('test.html', name=name))