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 entry in reader.toc.entries.items():
pprint.pprint(entry)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pgdumplib-0.2.0.tar.gz
(4.2 kB
view hashes)