Python PostgreSQL adapter - piro's development branches
C Python Other
Pull request Compare This branch is 119 commits behind psycopg:master.
Latest commit 3033361 Mar 10, 2016 @dvarrazzo Merge branch 'py35'
Failed to load latest commit information.
doc Start advertising Py 3.5 support Mar 10, 2016
lib Allow make_dsn to take no parameter Mar 3, 2016
psycopg Fixed read() exception propagation in copy_from Mar 10, 2016
sandbox cleanup remaining GPL license text May 20, 2014
scripts Don't need to build the env for a sdist Sep 1, 2014
tests Skip null array test on Postgres versions not supporting it Mar 10, 2016
.travis.yml Add .travis.yml for Travis CI ( Jun 15, 2012
AUTHORS Preparing release 2.3.0-beta1 Nov 6, 2010
LICENSE Changes license to LGPL3 + OpenSSL exception on all source files Feb 12, 2010 Fixed 'make sdist' to work with setuptools Mar 10, 2016
NEWS Fixed read() exception propagation in copy_from Mar 10, 2016
README.rst Direct link to the install docs in the readme Aug 24, 2014
psycopg2.cproj Dropped outdated HACKING file Aug 24, 2014
setup.cfg Dropped HAVE_PQFREEMEM flag Aug 24, 2014 Start advertising Py 3.5 support Mar 10, 2016
tox.ini Dropped Zope support Dec 3, 2012


psycopg2 - Python-PostgreSQL Database Adapter

Psycopg is the most popular PostgreSQL database adapter for the Python programming language. Its main features are the complete implementation of the Python DB API 2.0 specification and the thread safety (several threads can share the same connection). It was designed for heavily multi-threaded applications that create and destroy lots of cursors and make a large number of concurrent "INSERT"s or "UPDATE"s.

Psycopg 2 is mostly implemented in C as a libpq wrapper, resulting in being both efficient and secure. It features client-side and server-side cursors, asynchronous communication and notifications, "COPY TO/COPY FROM" support. Many Python types are supported out-of-the-box and adapted to matching PostgreSQL data types; adaptation can be extended and customized thanks to a flexible objects adaptation system.

Psycopg 2 is both Unicode and Python 3 friendly.


Documentation is included in the 'doc' directory and is available online.


If all the dependencies are met (i.e. you have the Python and libpq development packages installed in your system) the standard:

python build
sudo python install

should work no problem. In case you have any problem check the 'install' and the 'faq' documents in the docs or online.

For any other resource (source code repository, bug tracker, mailing list) please check the project homepage.