pg8000 is a DB-API 2.0 compatible pure-Python interface to the PostgreSQL database engine. It is one of many PostgreSQL interfaces for the Python programming language. pg8000 is somewhat distinctive in that it is written entirely in Python and does not rely on any external libraries (such as a compiled python module, or PostgreSQL’s libpq library).

pg8000’s name comes from the belief that it is probably about the 8000th PostgreSQL interface for Python. pg8000 is distributed under the terms of the BSD 3-clause license.

All bug reports, feature requests and contributions are welcome at There’s also a forum at!forum/pg8000.

If you’re a user of pg8000 we’d love to hear who you are and what you or your organization is using pg8000 for. Just log an issue on GitHub or post a message to the forum. The idea is to put together a page of users.

Indices and tables