# psycopg2 — card for AI agents

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

Category: Databases, ORMs and clients · PyPI package `psycopg2-binary` · latest version 2.9.13 (checked 2026-11-01)
Install: `pip install psycopg2-binary`
License: LGPL (weak-copyleft)

In your own product (generator, app, hosted service): **conditions**. Weak copyleft: fine inside a closed product, but changes to the library's own files stay under its license and must be shared.

## Numbers (AgentGid data)
- Gid Score: 71.0 (#340 of all tools, 13 of 120 in its category)
- Used in 99 public projects set up for AI coding agents (1.6%)
- Downloads last week: 55,558,720 (as of 2026-11-24), +8.6% over 4 weeks
- GitHub stars: 3,666 (as of 2026-11-24)
- Last push: 2026-11-01

## Often used with
python-dotenv 72.7%, Uvicorn 63.6%, FastAPI 61.6%, SQLAlchemy 61.6%, Pydantic 57.6%, Requests 44.4%

## Checked alternatives (same job)
- SQLAlchemy: https://agentgid.com/tools/sqlalchemy/agent.md
- asyncpg: https://agentgid.com/tools/asyncpg/agent.md
- PyMySQL: https://agentgid.com/tools/pymysql/agent.md
- Neo4j: https://agentgid.com/tools/neo4j/agent.md
- PyMongo: https://agentgid.com/tools/pymongo/agent.md

## Links
- AgentGid page: https://agentgid.com/tools/psycopg2-binary/
- Homepage: https://psycopg.org/
- Repository: https://github.com/psycopg/psycopg2

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
