Python

From PostgreSQL wiki

Jump to: navigation, search

There are several Python drivers for PostgreSQL. This is the incomplete feature matrix for them; please help complete it as you see fit.

In general, Python users want to use psycopg2 unless they have a strong reason to try another driver, most of which are no longer maintained. Since DBAPI allows drivers to have different semantics, porting applications from one driver to another is non-trivial.

Software License Platforms Python versions DB API 2.0 Native (uses libpq) Last Release Notes
Psycopg2 LGPL Unix, Win32 2.5-3.4 yes yes 2015 Most popular python driver, required for most Python+Postgres frameworks
pg8000 BSD any (pure Python) 2.5+ / 3.0+ yes no 2015 Used by Web2Py. current updated official site
py-postgresql BSD any (pure Python) 3.0+ yes no 2012 pure Python with optional C accelerator modules,
extensive custom API. Python 3 only.
PyGreSQL BSD Unix, Win32 2.3-2.6 yes yes 2012 Unmaintained?
ocpgdb BSD Unix 2.3-2.6 yes yes 2010 PG8.1+
bpgsql LGPL any (pure Python) 2.3-2.6 yes no 2009 labeled alpha

More abandoned driver projects:

  • pgasync, Twisted-native driver, no updates since 2005
  • PoPy, no updates since 2003
  • pyPgSQL, no updates since 2006

There is similar page on the Python wiki

Python PostgreSQL Driver TODO

Personal tools