Skip to main content

pgdumplib

Python 3 library for reading and writing pg_dump files using the custom format.

Version Status Coverage License Docs

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)

Source distribution for pgdumplib 4.0.0
File Size Uploaded
pgdumplib-4.0.0.tar.gz 36.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pgdumplib 4.0.0
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

4.0.0 This release

2 release files

3.1.0

1 release file

3.0.0

1 release file

2.1.0

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.0.1

2 release files

1.0.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page