async with create_engine(user='aiopg', database='aiopg', host='127.0.0.1', password='passwd') as engine:
async with engine.acquire() as conn:
await conn.execute(tbl.insert().values(val='abc'))
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())