Skip to main content

Library for getting passwords from pgpass files

Project description

pgpasslib is a library for retrieving passwords from a PostgreSQL password file, either from a location specified in the PGPASSFILE

Example

import pgpasslib

password = pgpasslib.getpass('localhost', 5432, 'postgres', 'postgres')
if not password:
    raise ValueError('Did not find a password in the .pgpass file')

Project details


Supported by

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