semvec/pypi-packages huggingface dataset:
psycaio 0.3
Asyncio psycopg2 mixin
License: MIT License
Requires Python: >=3.6
Keywords: asyncio,postgresql,psycopg2

# psycaio

A Python asyncio wrapper around psycopg2

## Example

```Python
import asyncio

from psycaio import connect


async def test_conn():
    cn = await connect(dbname='postgres')
    cr = cn.cursor()
    await cr.execute("SELECT 42")
    print(cr.fetchone()[0])
    cr = cn.cursor()
    await cr.execute("SELECT 42")
    print(cr.fetchone()[0])


if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(test_conn())
    loop.close()

```


## About

This package is meant as a minimal asyncio mixin for psycopg2.