This project has been archived by its maintainers, and is no longer receiving any updates.
pgpasslib
pgpasslib is a library for retrieving passwords from a PostgreSQL password file, either from a location specified in the PGPASSFILE environment variable or in the .pgpass file in the current user’s home directory.
Installation
pgpasslib may be installed via the Python package index with the tool of your choice. I prefer pip:
pip install pgpasslib
Documentation
Requirements
There are no requirements outside of the Python standard library.
Example
The following example will attempt to get the password for PostgreSQL running on localhost:5432 to the postgres database as the postgres user.
import pgpasslib
password = pgpasslib.getpass('localhost', 5432, 'postgres', 'postgres')
if not password:
raise ValueError('Did not find a password in the .pgpass file')
Version History
Available at https://pgpasslib.readthedocs.org
Metadata
Release files for pgpasslib 1.1.0
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 |
|---|---|---|---|---|
| pgpasslib-1.1.0.tar.gz | 5.2 kB | Without provenance | Details for pgpasslib-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pgpasslib-1.1.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for pgpasslib-1.1.0-py2.py3-none-any.whl |
Total release size: 13.0 kB
Release files / pgpasslib-1.1.0.tar.gz
| Download URL | pgpasslib-1.1.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f523050cb466f43526b2f4877bf2b1a1f09dfd7c7310e1e836c773f48bc10d27
|
|
BLAKE2b-256 checksum How to use checksums |
25f4dadd63a080573bca4cc5b53882997207604810ebe12373d04d5a0c687237
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pgpasslib-1.1.0-py2.py3-none-any.whl
| Download URL | pgpasslib-1.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
290084d524d07b8414d3457545c14ba7761cdcdc86350e9c9efbcb58210b77fc
|
|
BLAKE2b-256 checksum How to use checksums |
ef7ed93aaeac229141956853c282e94da3c3db3d592224344501e962b9485f4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pgpasslib 1.1.0
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.