--- id: pygresql version: "6.2.3" license: PostgreSQL license_treatment: unclear maintenance: aging --- # PyGreSQL — Python PostgreSQL interfaces License: unclear · Maintenance: aging · Downloads: 363.4K/mo ## What it is and what it does PyGreSQL is a mature Python module that provides direct access to PostgreSQL databases by wrapping the lower-level libpq C library. It has been in active development since 2006 and supports Python 3.8 through 3.14 on the server side with PostgreSQL versions 12 to 18. The package offers a straightforward way to connect to a database, execute queries, and retrieve results without requiring an ORM or higher-level abstraction layer. The package is classified as mature but shows aging maintenance signals—the last release was 201 days ago, though the repository remains active. Installation requires both the PyGreSQL package itself and the libpq system library to be present on your client machine, which adds some setup friction compared to pure-Python database drivers. It has no runtime Python dependencies, making it lightweight once installed. Use it for: - Direct PostgreSQL queries in scripts or applications where a lightweight, low-level interface is preferred over an ORM. - Legacy Python codebases that already use PyGreSQL and need to remain on a maintained version. - Systems where libpq is already available and you want to avoid additional abstraction layers. - Database administration or reporting tools that need efficient, direct SQL execution. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PyGreSQL is a Python interface to PostgreSQL databases that wraps the libpq C API, allowing direct database connections and queries from Python code. Yes, if you need a lightweight, direct PostgreSQL interface and can manage the libpq system dependency. The package is mature and stable with no known vulnerabilities, but maintenance is aging—releases come infrequently. Suitable for established projects or where libpq is already present; consider a more actively maintained driver like psycopg if you are starting a new project or need frequent updates. ## Install pip install pygresql uv add pygresql poetry add pygresql ## Installing PyGreSQL Before you install: Medium install friction due to compiled C extension and requirement for libpq system library on the client machine. Package is mature (since 2006) with aging maintenance status—last release 201 days ago, but repository remains active with recent commits. License in practice: License treatment is marked unclear; the SPDX identifier is PostgreSQL, which is permissive, but raw license metadata is absent from the package metadata. Verify the actual license terms before adopting in proprietary or restricted contexts. Quickstart: pip install PyGreSQL import pygresql.pg as pg conn = pg.connect('localhost', 'mydb', user='postgres') result = conn.query('SELECT * FROM mytable') conn.close() libpq shared library must be installed and accessible on the client machine; PostgreSQL server versions 12 to 18 are supported. Verify before relying: - Specific performance characteristics or throughput compared to other PostgreSQL adapters. - Whether the PostgreSQL license treatment applies uniformly across all distributions or platforms. - Current adoption rate and community activity beyond the core maintainers. ## Package facts - License: PostgreSQL (unclear) - Python support: supports_current - Install friction: medium - Maintenance: aging - Downloads: 363.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags postgresql python driver, postgres database connection, libpq python wrapper, postgresql client library, python database adapter, postgresql, database-driver, c-extension [View on SkillFed](https://skillfed.io/packages/pygresql) · [View on PyPI](https://pypi.org/project/pygresql/)