--- id: psycopg version: "3.3.4" license: LGPL-3.0-only license_treatment: copyleft maintenance: active --- # psycopg — PostgreSQL database adapter for Python License: copyleft · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install psycopg uv add psycopg poetry add psycopg ## Description Psycopg 3: PostgreSQL database adapter for Python ================================================= Psycopg 3 is a modern implementation of a PostgreSQL adapter for Python. This distribution contains the pure Python package ``psycopg``. .. Note:: Despite the lack of number in the package name, this package is the successor of psycopg2_. Please use the psycopg2 package if you are maintaining an existing program using psycopg2 as a dependency. If you are developing something new, Psycopg 3 is the most current implementation of the adapter. .. _psycopg2: https://pypi.org/project/psycopg2/ Installation ------------ In short, run the following:: pip install --upgrade pip # to upgrade pip pip install "psycopg[binary,pool]" # to install package and dependencies If something goes wrong, and for more information about installation, please check out the `Installation documentation`__. .. __: https://www.psycopg.org/psycopg3/docs/basic/install.html# Hacking ------- For development information check out `the project readme`__. .. __: https://github.com/psycopg/psycopg#readme Copyright (C) 2020 The Psycopg Team ## AI interpretation — verify before relying Psycopg 3 is a modern PostgreSQL database adapter for Python that enables applications to connect to and query PostgreSQL databases. It is the current successor to psycopg2 and provides both pure Python and optional binary implementations. Verdict: Psycopg 3 is a production-ready PostgreSQL adapter with low installation friction, active maintenance, and no known security vulnerabilities. Its LGPL-3.0-only copyleft license is permissive for most use cases. Recommended for new Python projects requiring PostgreSQL connectivity. [View on SkillFed](https://skillfed.io/packages/psycopg) · [View on PyPI](https://pypi.org/project/psycopg/)