asyncpg

Асинхронный клиент для субд postgres

connection()

asyncpg.connection()

Возвращает объект соединения, asyncpg.connection.Connection()

conn = await connection('postgres://postgres:docsker@localhost/testdb')

create_pool()

asyncpg.create_pool()
pool = create_pool(DSN)
async with pool.asquire() as conn:
    conn.fetch()