# psycopg/psycopg

New generation PostgreSQL database adapter for the Python programming language

Repository: https://github.com/psycopg/psycopg
Canonical: https://ross.abutalabs.com/products/psycopg
Homepage: https://www.psycopg.org/psycopg3/
Language: Python
License: LGPL-3.0
License Family: copyleft
Topics: database, development, python, postgresql, driver
Last push: 2026-08-26T21:18:45+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 2362, "days_push": 7, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2479, forks 268 (observed 2026-08-28T04:06:55.238885+00:00)

## What it is
Psycopg 3 is the modern generation PostgreSQL database adapter for Python, offering both pure Python and C-accelerated implementations plus connection pooling. It is the successor to the widely used psycopg2 library.

## Use cases
- connect to postgresql from python
- run sql queries against a postgres database
- use connection pooling for postgres in a web app
- async postgres access with asyncio
- migrate from psycopg2 to a modern driver
- insert and query b data from python

## When to choose
- you need a maintained, modern PostgreSQL driver for Python
- you want async support or connection pooling built in
- you are starting a new Python project using PostgreSQL

## When to avoid
- you must maintain legacy code tightly coupled to psycopg2 APIs
- you need a database other than PostgreSQL

## Facets
- artifact type: library
- maturity: active
- function: database-driver, database
- domain: databases, backend, developer-tools
- platform: python, cross-platform
- tags: postgresql, psycopg3, libpq, connection-pooling, async-support

## Member repositories
- psycopg/psycopg (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:55.238885+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:28:16.536423+00:00, confidence not recorded.
  - readme: https://github.com/psycopg/psycopg (fetched 2026-08-28T04:06:55.238885+00:00, sha 4974cd21d3e1)
  - homepage: https://www.psycopg.org/psycopg3/ (fetched 2026-08-29T10:10:24.663061+00:00, sha 306ae57e01b6)
  - registry_pypi: https://pypi.org/pypi/psycopg/json (fetched 2026-08-29T10:10:24.665704+00:00, sha da1824261531)
- Data as of 2026-08-30T08:39:29.467469+00:00.
