pgdumplib
Python 3 library for reading and writing pg_dump files using the custom format.
Installation
pip install pgdumplib
Example Usage
The following example shows how to create a dump and then read it in, and iterate through the data of one of the tables.
pg_dump -d pgbench -Fc -f pgbench.dump
import pgdumplib
dump = pgdumplib.load('pgbench.dump')
print('Database: {}'.format(dump.toc.dbname))
print('Archive Timestamp: {}'.format(dump.toc.timestamp))
print('Server Version: {}'.format(dump.toc.server_version))
print('Dump Version: {}'.format(dump.toc.dump_version))
for line in dump.table_data('public', 'pgbench_accounts'):
print(line)
Release files for pgdumplib 4.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pgdumplib-4.0.0.tar.gz | 36.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pgdumplib-4.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.2 kB
Release files / pgdumplib-4.0.0.tar.gz
| Download URL | pgdumplib-4.0.0.tar.gz |
|---|---|
| Size | 36.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b367290c9976e6c868a6b08054ca46fbf02c9764166b522c98a31ec387dfc54e
|
|
BLAKE2b-256 checksum How to use checksums |
85412b383725c83994d619549fc28229da310c3a0d117cf3417cdb823183a183
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2025.
Transparency logRelease files / pgdumplib-4.0.0-py3-none-any.whl
| Download URL | pgdumplib-4.0.0-py3-none-any.whl |
|---|---|
| Size | 19.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee836f6379f8aa44bf175988d4c988dd5e7d69f88ec55ee26be2398471a6f86c
|
|
BLAKE2b-256 checksum How to use checksums |
3fd1c8ac8deea38b7b3c7be09a3c2eef5fc83e17a4d52fdef40f402c8922f868
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2025.
Transparency log