psycopg/psycopg2
PostgreSQL database adapter for the Python programming language observed · 2026-08-28
Health v2 · maintenance only
68/100
- Activity 80
- Release rhythm 35
- Longevity 100
Flags: no_releases no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4972
- days_rel: n/a
- days_push: 123
- n_releases_24m: 0
Adoption not part of the score
3652 stars · 546 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Psycopg2 is the most popular PostgreSQL database adapter for Python, implementing the Python DB API 2.0 specification. It is mostly written in C as a libpq wrapper, offering thread safety, server-side and client-side cursors, async notifications, and COPY support.
Use cases
- connect to postgresql from python
- run sql queries against a postgres database
- bulk load data with COPY FROM
- use postgres from a multi-threaded python application
- execute concurrent inserts and updates
- adapt python types to postgresql data types
When to choose
- maintaining a legacy application already using psycopg2
- needing a mature, battle-tested DB-API 2.0 driver for PostgreSQL
- supporting very old PostgreSQL versions (7.4+) or older Python versions
When to avoid
- starting a new Python project (use Psycopg 3 instead)
- needing native asyncio support
- needing prepared statements, pipeline mode, or static typing
- needing a modern connection pool
Facets
library · maturity maintenance
database-driver database databases backend developer-tools python cross-platform postgresql db-api-2 libpq sql legacy-support
6 sources
- readme: https://github.com/psycopg/psycopg2 · fetched 2026-08-28 · 3ab996b6bb9b
- homepage: https://www.psycopg.org/ · fetched 2026-08-29 · a92bc26b862e
- site_page: https://www.psycopg.org/psycopg3/docs/basic/install.html · fetched 2026-08-29 · f4f428851775
- site_page: https://www.psycopg.org/psycopg3/docs · fetched 2026-08-29 · 6a71e6e185d5
- site_page: https://www.psycopg.org/docs/install.html · fetched 2026-08-29 · 94c1b5bdd8c2
- site_page: https://www.psycopg.org/docs · fetched 2026-08-29 · ac59e0078aca
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| psycopg/psycopg2 | main | 68 |
For agents
markdown · JSON · MCP: product_card(name="psycopg/psycopg2")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem