PostgreSQL driver for Python — Psycopg

Psycopg is the most popular PostgreSQL adapter for the Python programming language. Its core is a complete implementation of the Python DB API 2.0 specifications. Several extensions allow access to many of the features offered by PostgreSQL.

Psycopg is released under the terms of the GNU Lesser General Public License, allowing use from both free and proprietary software.

For help requests and development discussions please subscribe to the mailing list psycopg@postgresql.org.

Latest articles

Psycopg 3.3 released

Posted by Daniele Varrazzo on 2025-12-01
Tagged as news, release

We have released Psycopg 3.3 — and you should be excited about it!

Read more...

Automatic async to sync code conversion

Posted by Daniele Varrazzo on 2024-09-23
Tagged as psycopg3, development

Psycopg 3 provides both a sync and an async Python interface: for each object used to perform I/O operations, such as Connection, Cursor, there is an async counterpart: AsyncConnection, AsyncCursor, with an intuitive interface: just add the right async or await keyword where needed:

Read more...

Psycopg 3.2 released

Posted by Daniele Varrazzo on 2024-06-30
Tagged as news, release

It was quite the ride! But we made it!

After almost two years, 846 commits, more than 700 new tests, more than 20000 changes in 310 files (I didn't even realise that there were 310 files in this project...) Psycopg 3.2 has been released!

This release brings a few new feature and hopefully no meaningful non-backward compatible change. The whole list of changes is available in the changelog; these are some of the major points explained.

Read more...

See all articles...