Registry / database / pypgconfig

pypgconfig

JSON →
library0.1.0a2pypypi✓ verified 82d ago

PyPgConfig provides a Python interface to retrieve PostgreSQL build configuration values (like version, cflags, libraries) from pg_config. Current version is 0.1.0a2, released as an alpha. Development is active on GitHub.

pip install pypgconfig
INSTALL
IMPORT
SIG · PYPGCONFIG
P
pypgconfig
databasepythonv0.1.0a2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PgConfig
from pypgconfig import PgConfig
from pypgconfig import config

Retrieve PostgreSQL build configuration values using dot notation.

from pypgconfig import PGConfig # Get all configuration values as a dict config = PGConfig() print(config.version) print(config.bindir) print(config.package_build_version)
Debug
Known issues
gotchapg_config must be installed and available in PATH. The library does not bundle or install PostgreSQL.
fix
Install PostgreSQL development package (e.g., libpq-dev on Debian/Ubuntu, postgresql-devel on RHEL, or full PostgreSQL). Ensure pg-config is in PATH.
affects: all
deprecatedThe older method of calling config() directly without instantiation may be removed in future versions.
fix
Use PGConfig() instead of config().
affects: all
Upgrade
Version history
0.1.0a2latest on PyPI · released Nov 27, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
pypgconfig — pip install pypgconfig · libregistry