aiopg vs asyncpg vs psycopg3

This page summarizes the projects mentioned and recommended in the original post on /r/learnpython

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • aiopg

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

  • aiopg: 1.3k starts, last commit 1 nov 2021, recent bug in newer SQLAlchemy version, few open PRs, most recent PRs did not get a contributor response.

  • asyncpg

    A fast PostgreSQL Database Client Library for Python/asyncio.

  • asyncpg: 5.5k starts, last commit recently, ~150 issues, some incompatibility, few open PRs, extensive README. Includes benchmark showing it's supposedly 3x faster than aiopg and psycopg2, psycopg3 is not mentioned in the benchmark.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • psycopg

    New generation PostgreSQL database adapter for the Python programming language

  • psycopg3: 707 stars (que?), last commit recently, 20 issues, some incompatibility , 3 open PRs. First page of merged PRs were this year (2022). Extensive docs, docs on async topic include useful examples.In one of the PRs, a main contributor shared a blogpost (May 2020) they wrote. The topic was optimization and tagged with psycopg and development. asyncpg is faster, but psycopg aims to be more user-friendly

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts