Answer the question
In order to leave comments, you need to log in
Aiohttp asyncpgsa how to give json?
Hello, help me send json when requesting, I have a view
async def cars(request):
"""
Возвращаем все машины из бд
"""
async with request.app['db'].acquire() as conn:
query = select([car])
result = await conn.fetch(query)
return web.Response(body=str(result))
[<Record id=1 brand='Lada priora' number='e456xe97'>, <Record id=2 brand='bmw x5' number='e123xd56'>]
Answer the question
In order to leave comments, you need to log in
dict(result) In general, the dock has https://asyncpgsa.readthedocs.io/en/latest/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question