postgresql-anyio is an AnyIO (asyncio or trio backend) PostgreSQL client library.
It's a slighty modified version of the amazing library pgtrio created by Mostafa Razavi.
-
Start a localhost PostgreSQL instance on port 5432 (default).
-
Check if
pg_ctlis on PATH. -
Run
./test.sh
Install with poetry add git+https://github.com/abraaoz/postgresql-anyio.git#main
Use as pgtrio README.md, but:
| Find: | Replace with: |
|---|---|
| import pgtrio | import postgresql_anyio |
| import trio | import anyio |
| trio.run(main) | anyio.run(main, backend="trio") or anyio.run(main, backend="asyncio") |