pg_summary
Create a summary of unique values for each column in a Postgres table or view and summarize results in an Excel workbook.
Installation
You can install pg_summary via pip from PyPI:
pip install pg-summary
There is also a Docker image available on the GitHub Container Registry:
docker pull ghcr.io/geocoug/pg-summary:latest
Usage
The following example demonstrates how to use pg_summary to summarize a Postgres table. By default, the output is an Excel file with one sheet. Each column in the sheet will summarize a column in the Postgres table with the unique values, number of unique values, number of null values, data type, and the column name.
Each of the examples below will produce the exact same output.
Python
from pg_summary import PgSummary
PgSummary(
host="localhost",
port=5432,
database="mydb",
user="myuser",
table_or_view="mytable",
schema="staging",
).summarize()
Command Line
pg_summary -v localhost -u myuser -d mydb -t mytable -s staging
Docker
docker run --rm -v $(pwd):/data ghcr.io/geocoug/pg-summary:latest -v localhost -u myuser -d mydb -t mytable -s staging
Metadata
Release files for pg-summary 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pg_summary-0.0.3.tar.gz | 47.4 kB | Without provenance | Details for pg_summary-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pg_summary-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for pg_summary-0.0.3-py3-none-any.whl |
Total release size: 80.2 kB
Release files / pg_summary-0.0.3.tar.gz
| Download URL | pg_summary-0.0.3.tar.gz |
|---|---|
| Size | 47.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
64f9890e97c926f7e8a00bb7acc9ab5bc4fbf1eb84c6bb88934948b45567f251
|
|
BLAKE2b-256 checksum How to use checksums |
daddc402f6d88e7e4d361ddb80697d72a1adaf92cc19592a77ab417a0524976f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / pg_summary-0.0.3-py3-none-any.whl
| Download URL | pg_summary-0.0.3-py3-none-any.whl |
|---|---|
| Size | 32.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f80b26c89f0d543add8e58f6d6da29eebb0cf58a2376698d7c29bbacd04a15d6
|
|
BLAKE2b-256 checksum How to use checksums |
903a22d23f9febe5d48e11f83b21bc515e3ad8f6a516208ba2332cf73170c8c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Security for pg-summary 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.