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')