params = {
...
'reply_markup': {
'inline_keyboard': [[
{'text': '', 'callback_data': '/pic_vote 0'},
{'text': '', 'callback_data': '/pic_vote 1'}
]]
}
}
async def some_coro(engine: aiopg.sa.Engine):
async with engine.acquire() as conn:
await conn.execute(query)
loop = asyncio.get_event_loop()
engine = loop.run_until_complete(aiopg.sa.create_engine(db_url, loop=loop))
loop.run_until_complete(some_coro(engine=engine))
engine.close()
loop.run_until_complete(engine.wait_closed())
cursor.execute("INSERT OR IGNORE INTO t1 (col1, col2, col3) VALUES (? ? ?)", (col1, col2, col3))