2010-02-09 07:58:28 +03:00
|
|
|
=================================================
|
|
|
|
Psycopg -- PostgreSQL database adapter for Python
|
|
|
|
=================================================
|
|
|
|
|
|
|
|
.. sectionauthor:: Daniele Varrazzo <daniele.varrazzo@gmail.com>
|
|
|
|
|
|
|
|
Psycopg is a PostgreSQL_ database adapter for the Python_ programming
|
2010-02-10 00:31:40 +03:00
|
|
|
language. Its main advantages are that it supports the full Python |DBAPI|_
|
2010-02-09 07:58:28 +03:00
|
|
|
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
|
2010-02-11 06:15:14 +03:00
|
|
|
make a conspicuous number of concurrent :sql:`INSERT`\ s or :sql:`UPDATE`\ s.
|
|
|
|
The psycopg distribution includes ZPsycopgDA, a Zope_ Database Adapter.
|
2010-02-09 07:58:28 +03:00
|
|
|
|
2010-02-09 23:04:49 +03:00
|
|
|
Psycopg 2 is an almost complete rewrite of the Psycopg 1.1.x branch. Psycopg 2
|
2010-02-11 06:15:14 +03:00
|
|
|
features complete libpq_ v3 protocol, |COPY-TO-FROM|__ and full :ref:`object
|
|
|
|
adaptation <python-types-adaptation>` for all basic Python types: strings (including unicode), ints,
|
2010-02-09 07:58:28 +03:00
|
|
|
longs, floats, buffers (binary objects), booleans, `mx.DateTime`_ and builtin
|
|
|
|
datetime types. It also supports unicode queries and Python lists mapped to
|
|
|
|
PostgreSQL arrays.
|
|
|
|
|
|
|
|
.. _PostgreSQL: http://www.postgresql.org/
|
|
|
|
.. _Python: http://www.python.org/
|
|
|
|
.. _Zope: http://www.zope.org/
|
|
|
|
.. _libpq: http://www.postgresql.org/docs/8.4/static/libpq.html
|
2010-02-11 06:15:14 +03:00
|
|
|
.. |COPY-TO-FROM| replace:: :sql:`COPY TO/COPY FROM`
|
2010-02-09 07:58:28 +03:00
|
|
|
.. __: http://www.postgresql.org/docs/8.4/static/sql-copy.html
|
|
|
|
|
|
|
|
Contents:
|
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 2
|
|
|
|
|
|
|
|
usage
|
|
|
|
module
|
|
|
|
connection
|
|
|
|
cursor
|
|
|
|
advanced
|
|
|
|
extensions
|
|
|
|
tz
|
|
|
|
extras
|
|
|
|
|
|
|
|
.. ifconfig:: todo_include_todos
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
**To Do items in the documentation**
|
|
|
|
|
|
|
|
.. todolist::
|
|
|
|
|
|
|
|
|
|
|
|
Indices and tables
|
|
|
|
==================
|
|
|
|
|
|
|
|
* :ref:`genindex`
|
|
|
|
* :ref:`modindex`
|
|
|
|
* :ref:`search`
|
|
|
|
|
|
|
|
|