app.router.add_route('GET', '/list/{name}', list)
from aiohttp import web
async def get_list(request):
list_id = request.match_info['list_id']
page = request.query.get('page', 1)
text = 'List {} with page {}'.format(list_id, page)
return web.Response(text=text)
app = web.Application()
app.router.add_get('/lists/{list_id}', get_list)
web.run_app(app)