Skip to main content

Library for reading PostgreSQL backups created with pg_dump

Project description

Library for accessing PostgreSQL backups created with pg_dump.

Currently supports directory based dumps and full ToC decoding.

Example Usage

pg_dump -s -Fd -f foo.dump
import pprint

from pgdumplib import directory


reader = directory.Reader('foo.dump')
print('Header: {}'.format(reader.toc.header))
print('Database: {}'.format(reader.toc.dbname))
print('Archive Timestamp: {}'.format(reader.timestamp))
print('Server Version: {}'.format(reader.server_version))
print('Dump Version: {}'.format(reader.dump_version))

for dump_id, entry in reader.toc.entries.items():
    print(dump_id)
    pprint.pprint(entry)

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pgdumplib-0.1.2-py2.py3-none-any.whl (5.0 kB) Copy SHA256 hash SHA256 Wheel py2.py3

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page