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)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pgdumplib-4.0.0.tar.gz (36.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pgdumplib-4.0.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file pgdumplib-4.0.0.tar.gz.

File metadata

  • Download URL: pgdumplib-4.0.0.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pgdumplib-4.0.0.tar.gz
Algorithm Hash digest
SHA256 b367290c9976e6c868a6b08054ca46fbf02c9764166b522c98a31ec387dfc54e
MD5 b84c6dc0417871187cefb77575c27fe6
BLAKE2b-256 85412b383725c83994d619549fc28229da310c3a0d117cf3417cdb823183a183

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgdumplib-4.0.0.tar.gz:

Publisher: deploy.yaml on gmr/pgdumplib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pgdumplib-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: pgdumplib-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pgdumplib-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee836f6379f8aa44bf175988d4c988dd5e7d69f88ec55ee26be2398471a6f86c
MD5 7133f352b090c43f8f3846ff0b98508d
BLAKE2b-256 3fd1c8ac8deea38b7b3c7be09a3c2eef5fc83e17a4d52fdef40f402c8922f868

See more details on using hashes here.

Provenance

The following attestation bundles were made for pgdumplib-4.0.0-py3-none-any.whl:

Publisher: deploy.yaml on gmr/pgdumplib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

4.0.0 This release

2 files

3.1.0

1 file

3.0.0

1 file

2.1.0

1 file

2.0.1

1 file

2.0.0

1 file

1.0.1

2 files

1.0.0

1 file

0.2.1

1 file

0.2.0

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page