Ejemplo n.º 1
0
async def extra_args_controller(name: str, **kwargs: Any) -> Response:
    return text(hello(kwargs['extra']), name=name)
Ejemplo n.º 2
0
async def post_execution_middleware_controller(name: str) -> Response:
    return text(body=hello(name))
async def background_tasks_controller(name: str) -> Response:
    return text(
        f'Hello {name}!\n{name} are the #{HelloCounter.counter}!',
        background_tasks=HelloCounter.count,
    )
Ejemplo n.º 4
0
async def plaintext():
    return text('Hello, world!')