pgpq is a Python library for fast encoding of Apache Arrow data into PostgreSQL-compatible binary format (e.g., COPY with binary format). Version 0.11.1 is the latest, with weekly releases. It requires Python >=3.10.
pip install pgpqNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Encode a PyArrow table into PostgreSQL binary COPY format.
Use encode(table) directly; the format is always binary.
Replace Encoder(table).encode() with pgpq.encode(table).
Use pgpq solely for binary COPY. For CSV/text, use PyArrow's write_csv or other libraries.
pip install pyarrow
Use pgpq.encode(table) instead of pgpq.Encoder(table).encode().