$npx skillfedfor your agent

aiopg

Postgres integration with asyncio.

With conditionsPyPI DatabaseReleased Oct 2022634.7K downloads / moBSDPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — aiopg-1.4.0-py3-none-any.whl
v1.4.0 · released 2022-10-26 · Python >=3.7 · 2 runtime deps: psycopg2-binary, async-timeout

Yes, with conditions. aiopg is stable and production-ready for async PostgreSQL access, with low install friction and no known vulnerabilities. However, the aging maintenance status (last release October 2022) means it may lag behind recent PostgreSQL or asyncio changes. Install it if you need async PostgreSQL support in an existing codebase or stable async framework; evaluate alternatives if you require cutting-edge PostgreSQL features or are starting a new project where ongoing maintenance is critical.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a running PostgreSQL server and psycopg2-binary (C extension) to be installed; psycopg2-binary must compile or a pre-built wheel must be available for your platform.
  • Low install friction with a pure-wheel distribution.
  • Maintenance status is aging—last release was 2022-10-26 (1388 days ago)—but the repository remains active and unarchived.

License · maintenance · safety

BSD (permissive) — BSD permissive license places no restrictions on use, modification, or distribution in proprietary or open-source projects.

last release 2022-10-26 (1388 days) · last repo commit 2025-12-03 · 1,432 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 634,709 downloads/mo, #5,643 on PyPI

Verify before relying

import asyncio
import aiopg

async def query():
    pool = await aiopg.create_pool('dbname=mydb user=user password=pass host=localhost')
    async with pool.acquire() as conn:
        async with conn.cursor() as cur:
            await cur.execute('SELECT 1')
            async for row in cur:
                print(row)

asyncio.run(query())
  • Whether the aging maintenance status (1388 days since last release) affects compatibility with recent PostgreSQL versions or asyncio changes.
  • Current state of SQLAlchemy integration support given the 1.4.x compatibility fixes in the changelog but no recent releases.
Same gist for agents: .md · .json

What it is and what it does

aiopg is an asyncio driver for PostgreSQL that wraps psycopg2's synchronous interface to provide non-blocking database access. It lets you execute queries, manage transactions, and maintain connection pools without blocking the event loop—essential for async web frameworks and concurrent applications that need to query PostgreSQL.

The library supports both raw SQL execution via cursors and optional SQLAlchemy integration for ORM-style queries. It handles connection pooling, transaction management, and cursor operations asynchronously. Two runtime dependencies—psycopg2-binary and async-timeout—provide the underlying database driver and timeout handling.

Use it for

  • Build async web services (FastAPI, aiohttp) that query PostgreSQL without blocking I/O.
  • Implement concurrent batch processing where multiple coroutines execute database queries in parallel.
  • Use SQLAlchemy ORM asynchronously by leveraging aiopg.sa for schema-driven database operations.
  • Manage connection pools efficiently in long-running async applications to avoid resource exhaustion.
  • Write async database migrations or data pipelines that process large datasets without halting the event loop.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, with conditions.

aiopg is stable and production-ready for async PostgreSQL access, with low install friction and no known vulnerabilities. However, the aging maintenance status (last release October 2022) means it may lag behind recent PostgreSQL or asyncio changes. Install it if you need async PostgreSQL support in an existing codebase or stable async framework; evaluate alternatives if you require cutting-edge PostgreSQL features or are starting a new project where ongoing maintenance is critical.

Install

aiopg on PyPI

Before you install

Low install friction with a pure-wheel distribution. Maintenance status is aging—last release was 2022-10-26 (1388 days ago)—but the repository remains active and unarchived. The package supports current Python versions (3.7–3.11) and has a stable production classifier.

Requires a running PostgreSQL server and psycopg2-binary (C extension) to be installed; psycopg2-binary must compile or a pre-built wheel must be available for your platform.

License in practice

BSD permissive license places no restrictions on use, modification, or distribution in proprietary or open-source projects.

Quickstart

import asyncio
import aiopg

async def query():
    pool = await aiopg.create_pool('dbname=mydb user=user password=pass host=localhost')
    async with pool.acquire() as conn:
        async with conn.cursor() as cur:
            await cur.execute('SELECT 1')
            async for row in cur:
                print(row)

asyncio.run(query())

Verify before relying

  • Whether the aging maintenance status (1388 days since last release) affects compatibility with recent PostgreSQL versions or asyncio changes.
  • Current state of SQLAlchemy integration support given the 1.4.x compatibility fixes in the changelog but no recent releases.

Package facts

LicenseBSD permissive
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
psycopg2-binaryasync-timeout
MaintenanceAging 1,388 days since the last release
Last repo commit
First released
Downloads634,709 / month, #5,643 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: DatabaseTopic :: Database :: Front-Ends

Evidence: aiopg-1.4.0-py3-none-any.whl

Tags

Capabilities
async postgres driverasyncio postgresql clientnon-blocking database accessasync connection poolingpsycopg2 async wrapperasyncio database libraryasync sql execution
Topics
async-databasepostgresconnection-pooling

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “async connection pooling”

  • aiopgaiopg provides asyncio-based access to PostgreSQL databases, wrapping…
  • httpcoreA minimal low-level HTTP client library that sends HTTP requests with…
  • acsyllaAcsylla is an async Python client library for Cassandra and ScyllaDB…

Give your agent the search over MCP, or paste the wish link into any chat.

More Database packages

psycopg2-binary Worth it
PyPI · Software Development · released Apr 2026

psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.

copyleftcompiled wheel · 3.9+
271.6Mdownloads / mo
redis Worth it
PyPI · Database · released Jul 2026

Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.

Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.

MITpure Python · 3.10+
268.3Mdownloads / mo
ydb Worth it
PyPI · Database · released Jul 2026

YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.

Install it if you need to connect Python applications to YDB databases.

permissive licensepure Python · 3.10+
210.0Mdownloads / mo
snowflake-connector-python Worth it
PyPI · Software Development · released Aug 2026

Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.

Apache-2.0compiled wheel · 3.10+
193.6Mdownloads / mo
sqlparse Worth it
PyPI · Software Development · released Aug 2026

sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.

Install it if you need to manipulate, format, or analyze SQL text programmatically.

BSD-3-Clausepure Python · 3.10+
148.9Mdownloads / mo
dbt-adapters With conditions
PyPI · Database · released Jul 2026

Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.

Apache-2.0pure Python · 3.10.0+
121.3Mdownloads / mo

See also aiomysql · hopsworks-aiomysql · aioodbc · databases · aiosqlite · opentelemetry-instrumentation-aiopg · psycopg · postgres · psycopg2 · aiosmtplib