# aio-libs/aiopg

aiopg is a library for accessing a PostgreSQL database from the asyncio

Repository: https://github.com/aio-libs/aiopg
Canonical: https://ross.abutalabs.com/products/aiopg
Homepage: http://aiopg.rtfd.io
Language: Python
License: BSD-2-Clause
License Family: permissive
Topics: asyncio, postgresql, sqlalchemy
Last push: 2025-12-03T21:01:33+00:00

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

## Adoption (not part of the score)
Stars 1431, forks 169 (observed 2026-08-28T04:04:42.446019+00:00)

## What it is
aiopg is a Python library for accessing PostgreSQL databases from asyncio applications, wrapping the asynchronous features of the Psycopg driver. It provides connection pooling, async cursors, and optional SQLAlchemy Core integration via aiopg.sa.

## Use cases
- query postgres from an asyncio application
- async postgres connection pool in python
- use sqlalchemy core with asyncio and postgres
- run non-blocking database queries in aiohttp web app
- listen to postgres notifications asynchronously
- migrate blocking psycopg code to asyncio

## When to choose
- you need asynchronous PostgreSQL access in an asyncio-based Python app
- you want connection pooling with async/await syntax
- you use SQLAlchemy Core expressions with async execution
- you need LISTEN/NOTIFY support without blocking the event loop

## When to avoid
- you use async frameworks built on asyncpg-style APIs and want maximum raw performance (consider asyncpg)
- you need full async SQLAlchemy ORM sessions (use SQLAlchemy's native asyncio support instead)
- your application is synchronous/threaded and doesn't use asyncio
- you target databases other than PostgreSQL

## Facets
- artifact type: library
- maturity: active
- function: database-driver, database, orm, concurrency
- domain: databases, backend, web-development, developer-tools
- platform: python, windows, cross-platform
- tags: asyncio, postgresql, psycopg, sqlalchemy, connection-pool, async-database, linux, macos

## Member repositories
- aio-libs/aiopg (main) score 48

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:42.446019+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-30T04:37:05.654120+00:00, confidence not recorded.
  - readme: https://github.com/aio-libs/aiopg (fetched 2026-08-28T04:04:42.446019+00:00, sha 02c7e9227672)
  - registry_pypi: https://pypi.org/pypi/aiopg/json (fetched 2026-08-29T11:48:59.970277+00:00, sha d522da4ece7a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
