from aiohttp import web
import random
routes = web.RouteTableDef()

@routes.get("/another/path")
@routes.get("/some/path")
async def handle_this_path(req : web.Request) -> web.Response:
    thing = req.headers
    return web.Response(status=200, 
        text=f"The number is {random.randrange(1000)} and the header were {thing}"
    )

@routes.get("/")
async def oops(req : web.Request) -> web.Response:
    return web.Response(status=200, text="wrong!")


if __name__ == '__main__':
    app = web.Application()
    app.add_routes(routes)
    web.run_app(app) # this function never returns