Skip to content

hackgnar/pg8000

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pg8000

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             127.0.0.1/32            md5

and run tox from the pg8000 directory:

tox

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

Stress Test

There's a stress test that is run by doing:

python ./multi

The idea is to set in postgresql.conf to 128kB, and then run the stress test, and you should get no unpinned buffers errors.

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

About

A Pure-Python PostgreSQL Driver

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.9%
  • Shell 0.1%