Skip to content
This repository

A Pure-Python PostgreSQL Driver

branch: master


pg8000 is a pure-Python PostgreSQL driver that complies with DB-API 2.0. The driver communicates with the database using the PostgreSQL Backend / Frontend Protocol.

For more information, please see the documentation.

Regression Tests

To run the regression tests, install tox:

pip install tox

then add install all the supported Python versions, and add a line to pg_hba.conf requiring md5 for the database pg8000_md5, eg.

host    pg8000_md5      all               md5

and run tox from the pg8000 directory:


The pg8000.tests.tests_1_8 package are a copy of the tests from the 1.8 release and are kept to make sure we retain backward compatibility with it. It will probably be removed in a 2.0 release.

Unfortunately, tox doesn't support Python 2.5, so to test CPython 2.5 and Jython 2.5, run the script.

Performance Tests

To run the performance tests from the pg8000 directory:

python -m pg8000.tests.performance

Building The Documentation

The docs are written using Sphinx. To build them, install sphinx:

pip install sphinx

Then in the doc directory type:

make html
Something went wrong with that request. Please try again.