Skip to content
Agents tracked: 502 Releases (7d): 613 Agent status: 4 with issuesSince last limit reset: Claude 7d · Codex 5d For AI agents: Markdown Updated Nov 18, 2026

psycopg2 vs asyncpg

In 1,621 Python projects set up for AI coding agents, psycopg2 is a dependency in 99 (6.1%) and asyncpg in 68 (4.2%): psycopg2 is 1.5× as common. Among repos created in the last 90 days that use a databases, orms and clients tool, psycopg2 is in 20.0% and asyncpg in 28.0%, against 24.4% and 15.8% of older ones. 25 projects list both, often a sign of a migration or of a monorepo with several apps.

Databases, ORMs and clients PyPI Updated Nov 17, 2026

psycopg26.1%
asyncpg4.2%

Share of 1,621 Python projects set up for AI coding agents that list each one as a dependency.

Side by side

psycopg2asyncpg
Agent projects that use it9968
Rank in databases, orms and clients#7#11
In new repos with a databases, orms and clients tool (last 90 days)20.0%28.0%
In older repos with one24.4%15.8%
Downloads, last 7 days55.7M35.1M
GitHub stars3,6678,120
Last push to its repoNov 1, 2026Oct 8, 2026
LicenseLGPLApache-2.0
Funding——
Projects that list both25

Downloads include CI runs and installs as a dependency of other packages. Stars and pushes are from GitHub's API; downloads from PyPI.

By coding agent

Projects set up forPython repospsycopg2asyncpg
Claude Code7825.4%5.4%
GitHub Copilot8055.6%4.1%
Cursor5487.5%6.4%
Gemini CLI830%6.0%
OpenClaw1045.8%0%
Devin Desktop6010.0%8.3%

Share of the Python repos configured for each agent (its config file in the repo) that list the tool. A repo set up for two agents counts for both.

psycopg2

Popular PostgreSQL adapter for Python with full database access and query execution.

Most often used with it:

python-dotenv72.7% of its projects
Uvicorn63.6% of its projects
FastAPI61.6% of its projects
SQLAlchemy60.6% of its projects
Pydantic57.6% of its projects

pip install psycopg2-binary

asyncpg

Fast asyncio PostgreSQL driver for non-blocking database operations in Python.

Most often used with it:

FastAPI89.7% of its projects
Uvicorn85.3% of its projects
Pydantic82.4% of its projects
SQLAlchemy75.0% of its projects
python-dotenv58.8% of its projects

pip install asyncpg

More matchups

asyncpg vs psycopgasyncpg vs aiosqlitePrisma vs Drizzle ORMpg vs Neon Serverless Driver

How we count

Projects are public GitHub repos our weekly scan finds through coding-agent config files (CLAUDE.md, AGENTS.md, .cursor/mcp.json and others); a project uses a tool when its package.json, requirements.txt or pyproject.toml lists it. "Same job" was checked for every pair, so add-ons and companions are never paired. Shares by repo age compare repos created in the last 90 days with older ones in the same scan. More on the method.