Python3 library for working with pg_dump files
Project description
pgdumplib
Python 3 library for reading and writing pg_dump files using the custom format.
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)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b367290c9976e6c868a6b08054ca46fbf02c9764166b522c98a31ec387dfc54e
|
|
| MD5 |
b84c6dc0417871187cefb77575c27fe6
|
|
| BLAKE2b-256 |
85412b383725c83994d619549fc28229da310c3a0d117cf3417cdb823183a183
|
Provenance
The following attestation bundles were made for pgdumplib-4.0.0.tar.gz:
Publisher:
deploy.yaml on gmr/pgdumplib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pgdumplib-4.0.0.tar.gz -
Subject digest:
b367290c9976e6c868a6b08054ca46fbf02c9764166b522c98a31ec387dfc54e - Sigstore transparency entry: 709043552
- Sigstore integration time:
-
Permalink:
gmr/pgdumplib@66b60841cea4bbef930a86e7784fa95b5b44853e -
Branch / Tag:
refs/tags/4.0.0 - Owner: https://github.com/gmr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yaml@66b60841cea4bbef930a86e7784fa95b5b44853e -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee836f6379f8aa44bf175988d4c988dd5e7d69f88ec55ee26be2398471a6f86c
|
|
| MD5 |
7133f352b090c43f8f3846ff0b98508d
|
|
| BLAKE2b-256 |
3fd1c8ac8deea38b7b3c7be09a3c2eef5fc83e17a4d52fdef40f402c8922f868
|
Provenance
The following attestation bundles were made for pgdumplib-4.0.0-py3-none-any.whl:
Publisher:
deploy.yaml on gmr/pgdumplib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pgdumplib-4.0.0-py3-none-any.whl -
Subject digest:
ee836f6379f8aa44bf175988d4c988dd5e7d69f88ec55ee26be2398471a6f86c - Sigstore transparency entry: 709043560
- Sigstore integration time:
-
Permalink:
gmr/pgdumplib@66b60841cea4bbef930a86e7784fa95b5b44853e -
Branch / Tag:
refs/tags/4.0.0 - Owner: https://github.com/gmr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yaml@66b60841cea4bbef930a86e7784fa95b5b44853e -
Trigger Event:
release
-
Statement type: