Import Upstream version 5.0.2

parent afc21c58
Written by D'Arcy J.M. Cain (darcy@druid.net)
Based heavily on code written by Pascal Andre (andre@chimay.via.ecp.fr)
Copyright (c) 1995, Pascal Andre
Further modifications copyright (c) 1997-2008 by D'Arcy J.M. Cain
(darcy@PyGreSQL.org)
Further modifications copyright (c) 2009-2016 by the PyGreSQL team.
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written agreement
is hereby granted, provided that the above copyright notice and this
paragraph and the following two paragraphs appear in all copies. In
this license the term "AUTHORS" refers to anyone who has contributed code
to PyGreSQL.
IN NO EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE
AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
ENHANCEMENTS, OR MODIFICATIONS.
include pgmodule.c
include pgtypes.h
include py3c.h
include pg.py
include pgdb.py
include setup.py
include setup.cfg
include README.rst
include LICENSE.txt
recursive-include tests *.py
include docs/Makefile
include docs/make.bat
include docs/*.py
include docs/*.rst
recursive-include docs/community *.rst
recursive-include docs/contents *.rst
recursive-include docs/download *.rst
recursive-include docs/_static *.css_t *.ico *.png
recursive-include docs/_templates *.html
recursive-include docs/_build/html *.css *.gif *.html *.ico *.js *.png *.txt
Metadata-Version: 1.1
Name: PyGreSQL
Version: 5.0.2
Summary: Python PostgreSQL Interfaces
Home-page: http://www.pygresql.org
Author: D'Arcy J. M. Cain
Author-email: darcy@PyGreSQL.org
License: Python
Download-URL: ftp://ftp.pygresql.org/pub/distrib/
Description: PyGreSQL is an open-source Python module that interfaces to a
PostgreSQL database. It embeds the PostgreSQL query library to allow
easy use of the powerful PostgreSQL features from a Python script.
Keywords: pygresql postgresql database api dbapi
Platform: any
Classifier: Development Status :: 6 - Mature
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Python Software Foundation License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: C
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: SQL
Classifier: Topic :: Database
Classifier: Topic :: Database :: Front-Ends
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Metadata-Version: 1.1
Name: PyGreSQL
Version: 5.0.2
Summary: Python PostgreSQL Interfaces
Home-page: http://www.pygresql.org
Author: D'Arcy J. M. Cain
Author-email: darcy@PyGreSQL.org
License: Python
Download-URL: ftp://ftp.pygresql.org/pub/distrib/
Description: PyGreSQL is an open-source Python module that interfaces to a
PostgreSQL database. It embeds the PostgreSQL query library to allow
easy use of the powerful PostgreSQL features from a Python script.
Keywords: pygresql postgresql database api dbapi
Platform: any
Classifier: Development Status :: 6 - Mature
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Python Software Foundation License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: C
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: SQL
Classifier: Topic :: Database
Classifier: Topic :: Database :: Front-Ends
Classifier: Topic :: Software Development :: Libraries :: Python Modules
LICENSE.txt
MANIFEST.in
README.rst
pg.py
pgdb.py
pgmodule.c
pgtypes.h
py3c.h
setup.cfg
setup.py
PyGreSQL.egg-info/PKG-INFO
PyGreSQL.egg-info/SOURCES.txt
PyGreSQL.egg-info/dependency_links.txt
PyGreSQL.egg-info/not-zip-safe
PyGreSQL.egg-info/top_level.txt
docs/Makefile
docs/about.rst
docs/announce.rst
docs/conf.py
docs/copyright.rst
docs/index.rst
docs/make.bat
docs/_build/html/announce.html
docs/_build/html/copyright.html
docs/_build/html/genindex.html
docs/_build/html/index.html
docs/_build/html/py-modindex.html
docs/_build/html/search.html
docs/_build/html/searchindex.js
docs/_build/html/_sources/announce.txt
docs/_build/html/_sources/copyright.txt
docs/_build/html/_sources/index.txt
docs/_build/html/_sources/community/index.txt
docs/_build/html/_sources/contents/changelog.txt
docs/_build/html/_sources/contents/examples.txt
docs/_build/html/_sources/contents/general.txt
docs/_build/html/_sources/contents/index.txt
docs/_build/html/_sources/contents/install.txt
docs/_build/html/_sources/contents/tutorial.txt
docs/_build/html/_sources/contents/pg/adaptation.txt
docs/_build/html/_sources/contents/pg/connection.txt
docs/_build/html/_sources/contents/pg/db_types.txt
docs/_build/html/_sources/contents/pg/db_wrapper.txt
docs/_build/html/_sources/contents/pg/index.txt
docs/_build/html/_sources/contents/pg/introduction.txt
docs/_build/html/_sources/contents/pg/large_objects.txt
docs/_build/html/_sources/contents/pg/module.txt
docs/_build/html/_sources/contents/pg/notification.txt
docs/_build/html/_sources/contents/pg/query.txt
docs/_build/html/_sources/contents/pgdb/adaptation.txt
docs/_build/html/_sources/contents/pgdb/connection.txt
docs/_build/html/_sources/contents/pgdb/cursor.txt
docs/_build/html/_sources/contents/pgdb/index.txt
docs/_build/html/_sources/contents/pgdb/introduction.txt
docs/_build/html/_sources/contents/pgdb/module.txt
docs/_build/html/_sources/contents/pgdb/typecache.txt
docs/_build/html/_sources/contents/pgdb/types.txt
docs/_build/html/_sources/contents/postgres/advanced.txt
docs/_build/html/_sources/contents/postgres/basic.txt
docs/_build/html/_sources/contents/postgres/func.txt
docs/_build/html/_sources/contents/postgres/index.txt
docs/_build/html/_sources/contents/postgres/syscat.txt
docs/_build/html/_sources/download/index.txt
docs/_build/html/_static/ajax-loader.gif
docs/_build/html/_static/basic.css
docs/_build/html/_static/cloud.css
docs/_build/html/_static/cloud.js
docs/_build/html/_static/comment-bright.png
docs/_build/html/_static/comment-close.png
docs/_build/html/_static/comment.png
docs/_build/html/_static/doctools.js
docs/_build/html/_static/down-pressed.png
docs/_build/html/_static/down.png
docs/_build/html/_static/favicon.ico
docs/_build/html/_static/file.png
docs/_build/html/_static/icon-caution.png
docs/_build/html/_static/icon-danger.png
docs/_build/html/_static/icon-deprecated.png
docs/_build/html/_static/icon-note.png
docs/_build/html/_static/icon-seealso.png
docs/_build/html/_static/icon-todo.png
docs/_build/html/_static/icon-warning.png
docs/_build/html/_static/jquery-1.11.1.js
docs/_build/html/_static/jquery.cookie.js
docs/_build/html/_static/jquery.js
docs/_build/html/_static/minus.png
docs/_build/html/_static/plus.png
docs/_build/html/_static/pygments.css
docs/_build/html/_static/pygresql.css
docs/_build/html/_static/pygresql.png
docs/_build/html/_static/searchtools.js
docs/_build/html/_static/underscore-1.3.1.js
docs/_build/html/_static/underscore.js
docs/_build/html/_static/up-pressed.png
docs/_build/html/_static/up.png
docs/_build/html/_static/websupport.js
docs/_build/html/community/index.html
docs/_build/html/contents/changelog.html
docs/_build/html/contents/examples.html
docs/_build/html/contents/general.html
docs/_build/html/contents/index.html
docs/_build/html/contents/install.html
docs/_build/html/contents/tutorial.html
docs/_build/html/contents/pg/adaptation.html
docs/_build/html/contents/pg/connection.html
docs/_build/html/contents/pg/db_types.html
docs/_build/html/contents/pg/db_wrapper.html
docs/_build/html/contents/pg/index.html
docs/_build/html/contents/pg/introduction.html
docs/_build/html/contents/pg/large_objects.html
docs/_build/html/contents/pg/module.html
docs/_build/html/contents/pg/notification.html
docs/_build/html/contents/pg/query.html
docs/_build/html/contents/pgdb/adaptation.html
docs/_build/html/contents/pgdb/connection.html
docs/_build/html/contents/pgdb/cursor.html
docs/_build/html/contents/pgdb/index.html
docs/_build/html/contents/pgdb/introduction.html
docs/_build/html/contents/pgdb/module.html
docs/_build/html/contents/pgdb/typecache.html
docs/_build/html/contents/pgdb/types.html
docs/_build/html/contents/postgres/advanced.html
docs/_build/html/contents/postgres/basic.html
docs/_build/html/contents/postgres/func.html
docs/_build/html/contents/postgres/index.html
docs/_build/html/contents/postgres/syscat.html
docs/_build/html/download/index.html
docs/_static/favicon.ico
docs/_static/pygresql.css_t
docs/_static/pygresql.png
docs/_templates/layout.html
docs/community/bugtracker.rst
docs/community/homes.rst
docs/community/index.rst
docs/community/mailinglist.rst
docs/community/source.rst
docs/community/support.rst
docs/contents/changelog.rst
docs/contents/examples.rst
docs/contents/general.rst
docs/contents/index.rst
docs/contents/install.rst
docs/contents/tutorial.rst
docs/contents/pg/adaptation.rst
docs/contents/pg/connection.rst
docs/contents/pg/db_types.rst
docs/contents/pg/db_wrapper.rst
docs/contents/pg/index.rst
docs/contents/pg/introduction.rst
docs/contents/pg/large_objects.rst
docs/contents/pg/module.rst
docs/contents/pg/notification.rst
docs/contents/pg/query.rst
docs/contents/pgdb/adaptation.rst
docs/contents/pgdb/connection.rst
docs/contents/pgdb/cursor.rst
docs/contents/pgdb/index.rst
docs/contents/pgdb/introduction.rst
docs/contents/pgdb/module.rst
docs/contents/pgdb/typecache.rst
docs/contents/pgdb/types.rst
docs/contents/postgres/advanced.rst
docs/contents/postgres/basic.rst
docs/contents/postgres/func.rst
docs/contents/postgres/index.rst
docs/contents/postgres/syscat.rst
docs/download/download.rst
docs/download/files.rst
docs/download/index.rst
tests/__init__.py
tests/dbapi20.py
tests/test_classic.py
tests/test_classic_connection.py
tests/test_classic_dbwrapper.py
tests/test_classic_functions.py
tests/test_classic_largeobj.py
tests/test_classic_notification.py
tests/test_dbapi20.py
tests/test_dbapi20_copy.py
tests/test_tutorial.py
\ No newline at end of file
PyGreSQL - Python interface for PostgreSQL
==========================================
PyGreSQL is a Python module that interfaces to a PostgreSQL database.
It embeds the PostgreSQL query library to allow easy use of the powerful
PostgreSQL features from a Python script.
PyGreSQL is developed and tested on a NetBSD system, but it should also
run on most other platforms where PostgreSQL and Python is running.
It is based on the PyGres95 code written by Pascal Andre.
D'Arcy (darcy@druid.net) renamed it to PyGreSQL starting with version 2.0
and serves as the "BDFL" of PyGreSQL.
Installation
------------
The simplest way to install PyGreSQL is to type::
$ pip install PyGreSQL
For other ways of installing PyGreSQL and requirements,
see the documentation.
Documentation
-------------
The documentation is available at http://www.pygresql.org/.
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build3.5
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PyGreSQL.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PyGreSQL.qhc"
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/PyGreSQL"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PyGreSQL"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
......@@ -2,13 +2,13 @@
PyGreSQL Announcements
======================
-------------------------------
Release of PyGreSQL version 4.0
-------------------------------
---------------------------------
Release of PyGreSQL version 5.0.2
---------------------------------
PyGreSQL v4.0 has been released.
Release 5.0.2 of PyGreSQL.
It is available at: ftp://ftp.PyGreSQL.org/pub/distrib/PyGreSQL-4.0.tgz.
It is available at: http://pygresql.org/files/PyGreSQL-5.0.2.tar.gz.
If you are running NetBSD, look in the packages directory under databases.
There is also a package in the FreeBSD ports collection.
......@@ -19,5 +19,14 @@ for things that have changed in this version.
Please refer to `readme.txt <readme.html>`_
for general information.
This version has been built and unit tested on:
- NetBSD
- FreeBSD
- openSUSE
- Ubuntu
- Windows 7 with both MinGW and Visual Studio
- PostgreSQL 9.0 to 9.5 32 and 64bit
- Python 2.6, 2.7, 3.3, 3.4 and 3.5 32 and 64bit
| D'Arcy J.M. Cain
| darcy@PyGreSQL.org
PyGreSQL Development and Support
================================
PyGreSQL is an open-source project created by a group of volunteers.
The project and the development infrastructure are currently maintained
by D'Arcy J.M. Cain. We would be glad to welcome more contributors
so that PyGreSQL can be further developed, modernized and improved.
.. include:: mailinglist.rst
.. include:: source.rst
.. include:: bugtracker.rst
.. include:: support.rst
.. include:: homes.rst
Examples
========
I am starting to collect examples of applications that use PyGreSQL.
So far I only have a few but if you have an example for me, you can
either send me the files or the URL for me to point to.
The :doc:`postgres/index` that is part of the PyGreSQL distribution
shows some examples of using PostgreSQL with PyGreSQL.
Here is a
`list of motorcycle rides in Ontario <http://ontario.bikerides.ca>`_
that uses a PostgreSQL database to store the rides.
There is a link at the bottom of the page to view the source code.
Oleg Broytmann has written a simple example
`RGB database demo <http://phdru.name/Software/Python/#rgb_example>`_
General PyGreSQL programming information
----------------------------------------
PyGreSQL consists of two parts: the "classic" PyGreSQL interface
provided by the :mod:`pg` module and the newer
DB-API 2.0 compliant interface provided by the :mod:`pgdb` module.
If you use only the standard features of the DB-API 2.0 interface,
it will be easier to switch from PostgreSQL to another database
for which a DB-API 2.0 compliant interface exists.
The "classic" interface may be easier to use for beginners, and it
provides some higher-level and PostgreSQL specific convenience methods.
.. seealso::
**DB-API 2.0** (Python Database API Specification v2.0)
is a specification for connecting to databases (not only PostGreSQL)
from Python that has been developed by the Python DB-SIG in 1999.
The authoritative programming information for the DB-API is :pep:`0249`.
Both Python modules utilize the same lower level C extension module that
serves as a wrapper for the C API to PostgreSQL that is available in form
of the so-called "libpq" library.
This means you must have the libpq library installed as a shared library
on your client computer, in a version that is supported by PyGreSQL.
Depending on the client platform, you may have to set environment variables
like `PATH` or `LD_LIBRARY_PATH` so that PyGreSQL can find the library.
.. warning::
Note that PyGreSQL is not thread-safe on the connection level. Therefore
we recommend using `DBUtils <http://www.webwareforpython.org/DBUtils>`_
for multi-threaded environments, which supports both PyGreSQL interfaces.
Another option is using PyGreSQL indirectly as a database driver for the
high-level `SQLAlchemy <http://www.sqlalchemy.org/>`_ SQL toolkit and ORM,
which supports PyGreSQL starting with SQLAlchemy 1.1 and which provides a
way to use PyGreSQL in a multi-threaded environment using the concept of
"thread local storage". Database URLs for PyGreSQL take this form::
postgresql+pygresql://username:password@host:port/database
The PyGreSQL documentation
==========================
Contents
--------
.. toctree::
:maxdepth: 1
Installing PyGreSQL <install>
What's New and History of Changes <changelog>
General PyGreSQL Programming Information <general>
First Steps with PyGreSQL <tutorial>
The Classic PyGreSQL Interface <pg/index>
The DB-API Compliant Interface <pgdb/index>
A PostgreSQL Primer <postgres/index>
Examples for using PyGreSQL <examples>
Indices and tables
------------------
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
=====================
PyGreSQL Installation
=====================