Skip to main content

Library for reading PostgreSQL backups created with pg_dump

Project description

pgdumplib
=========
Library for accessing PostgreSQL backups created with pg_dump.

Currently supports directory based dumps and full ToC decoding.

Example Usage
-------------

.. code:: bash
pg_dump -s -Fd -f foo.dump

.. code:: bash

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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

pgdumplib-0.1.1-py2.py3-none-any.whl (5.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pgdumplib-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: pgdumplib-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.2

File hashes

Hashes for pgdumplib-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6b32857ff613a5abe1169b0d72cfb0f2256455290b50e16550c0160eb1f4e555
MD5 e0fae7c41b6b8d61ec61107459618cca
BLAKE2b-256 06f27402782f87043d953ca44c3e2db2e9093e8065a7e3f885bb34e910a46768

See more details on using hashes here.

Supported by

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