Welcome to pg-purepy’s documentation!¶
pg-purepy is a Python 3.9+ library for connecting to a PostgreSQL server. As the name suggests,
it is written in pure-Python (no C dependencies), and exports three APIs:
A high-level asynchronous AnyIO API based on connection pooling, that wraps multiple individual persistent connections.
An mid-level asynchronous anyio API, based on singular connections, that handles the protocol parsing and networking for you.
A low-level sans-IO API, which only does protocol parsing and has no niceness but is ideal for writing your own client.
pg-purepyrequires at least Python 3.8. 3.7 may work, but is not actively supported.
pg-purepyrequires the latest version of PostgreSQL, although in practice the protocol parser should work with versions from 9.4 upwards.
- Message Types
- Low-Level API
- Asynchronous connection API
- High-level API
- Converting Arguments and Results