Psycopg – PostgreSQL database adapter for Python

Psycopg is a PostgreSQL database adapter for the Python programming language. Its main advantages are that it supports the full Python DB API 2.0 and it is thread safe (threads can share the connections). It was designed for heavily multi-threaded applications that create and destroy lots of cursors and make a conspicuous number of concurrent INSERTs or UPDATEs. The psycopg distribution includes ZPsycopgDA, a Zope Database Adapter.

Psycopg 2 is an almost complete rewrite of the Psycopg 1.1.x branch. Psycopg 2 features complete libpq v3 protocol, COPY TO/COPY FROM and full object adaptation for all basic Python types: strings (including unicode), ints, longs, floats, buffers (binary objects), booleans, mx.DateTime and builtin datetime types. It also supports unicode queries and Python lists mapped to PostgreSQL arrays.

Contents

Indices and tables

Note

To Do items in the documentation

Todo

should say something more about tz handling

(The original entry is located in tz.rst, line 13 and can be found here.)

Next topic

Basic module usage

This Page