1818
Comment:
|
7130
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
[[TableOfContents]] | |
Line 4: | Line 3: |
== Masthead == | = PostgreSQL = |
Line 7: | Line 6: |
licence:: BSD-like platforms:: Unix, win32 (Cygwin); a native win32 port is in the works |
licence:: BSD platforms:: Unix, win32 ([[http://www.postgresql.org/docs/faqs.FAQ_MINGW.html|NT-based Microsoft operating system]]) == Pros == From the [[http://www.postgresql.org/about/|features page]]: * Good compliance with SQL standards * Supports many SQL features * Foreign keys * Implements all SQL99 join types: inner join, left, right, full outer join, natural join * Subqueries * UNION and UNION ALL, INTERSECT and EXCEPT * Views * Triggers * Support for international character sets, multibyte character encodings, Unicode * Supports many languages for writing server-side functions/procedures and aggregates: Python, C, Perl, Tcl, PL/PgSQL, ... * ACID compliant * Support for rollback * Serializable transaction isolation * Multi-Version Concurrency Control (MVCC) for highly scalable concurrent applications == Cons == * [To be written] |
Line 12: | Line 35: |
=== PyGresQL === | === psycopg2 === |
Line 14: | Line 37: |
URL:: http://www.druid.net/pygresql/ | URL:: http://initd.org/psycopg/ Licence:: LGPL Platforms:: Unix, win32 Python versions:: 2.4, 2.5, 2.6, 2.7, 3.1, 3.2 Maintenance:: Active development Psycopg is the most popular PostgreSQL adapter for the Python programming language. At its core it fully implements the Python DB API 2.0 specifications. Several extensions allow access to many of the features offered by PostgreSQL. Extended documentation available on http://initd.org/psycopg/docs/ === PyGreSQL === URL:: http://www.pygresql.org/ |
Line 17: | Line 53: |
Python versions:: 1.5.2 thru 2.2 ==== Extensions to DB API ==== * Alternative old nonstandard PostgreSQL interface ==== Comments ==== === PoPy === URL:: http://popy.sourceforge.net licence:: GPL platforms:: Unix Python versions:: ==== Extensions to DB API ==== ==== Comments ==== === psycopg === URL:: http://initd.org/Software/psycopg licence:: GPL platforms:: Unix, win32 (beta) Python versions:: ==== Extensions to DB API ==== * dictfetchone(), dictfetchmany(), dictfechall() methods on the cursor object; these will return dictionaries instead of tuples, so you can access rows by name instead of by index ==== Comments ==== * Written for heavily multithreaded applications in mind. |
Python versions:: 2.6 thru 3.5 Maintenance:: Last version released is 5.0 (2016-03-20) |
Line 54: | Line 59: |
licence:: BSD-like platforms:: Unix, win32 Python versions:: 2.0 thru 2.2 |
Licence:: BSD-like (depends on mxDateTime, which may be GPL-incompatible) Platforms:: Unix, win32 Python versions:: 2.1 thru 2.3 Maintenance:: Active, sporatic (as of 10/2003) |
Line 63: | Line 69: |
==== Comments ==== | === mxODBC === |
Line 65: | Line 71: |
== Other Drivers == | URL:: http://www.egenix.com/products/python/mxODBC/ Licence:: eGenix Commercial License Platforms:: Windows, Linux, MacOS X, FreeBSD, Solaris, AIX Python versions:: 2.4 - 2.7 |
Line 67: | Line 76: |
=== driver name === | mxODBC is compatible with the [[http://www.postgresql.org/ftp/odbc/versions/|PostgreSQL ODBC driver]] on Windows and Unix. |
Line 69: | Line 78: |
URL:: licence:: platforms:: Python versions:: |
Note that you have to enable the advanced option "Use bytea for lo" in case you want to work with BLOBs. |
Line 74: | Line 80: |
==== Programming Model ==== | === pyodbc === URL:: http://code.google.com/p/pyodbc License:: MIT Platforms:: Windows, Linux, MacOS X, FreeBSD, Solaris, Any (source provided) Python versions:: 2.4 - 2.6 Actively maintained Open Source project. Precompiled binaries are available for Windows. Red``Hat Enterprise Linux, Centos, and Fedora have precompiled RPMs available in their Extras repositories. === py-postgresql === URL:: http://python.projects.postgresql.org License:: BSD/MIT/PSF Platforms:: Any (windows installers available) Python version:: 3.x Maintenance:: Active development |
Line 78: | Line 103: |
Python 3 port of pg_proboscis and friends. Pure Python with C optimizations. Prepared statement driven APIs, PG-API.(DB-API is there as well). Written with efficiency and flexibility in mind. Data is streamed in when requested to do so, and always is streamed in under DB-API. === txpostgres === URL:: https://launchpad.net/txpostgres/ License:: MIT/X/Expat Platforms:: Any A Twisted wrapper for asynchronous PostgreSQL connections. Uses psycopg2, which exposes the async interfaces of the native PostgreSQL library, libpq. Can be used as a drop-in replacement for Twisted's adbapi module when working with PostgreSQL. The only part that does not provide 100% compatibility is connection pooling, although pooling provided by txpostgres is very similar to the one Twisted adbapi offers. === pg8000 === URL:: http://pythonhosted.org/pg8000/ License:: BSD Platforms:: Any Python version:: 2.5, 2.6, 2.7, 3.2, 3.3, 3.4 pg8000 is somewhat distinctive in that it is written entirely in Python and does not rely on any external libraries '''Important''': New [[http://code.google.com/p/pg8000/|maintenance fork]] including several bugfixes, compatibility features and extensibility enhancements similar to psycopg2 exposed functionalities. [[http://html.pg8000.googlecode.com/hg/index.html|Up to date documentation]] === PyPyODBC (Pure Python ODBC) === URL:: http://code.google.com/p/pypyodbc License:: MIT Platforms:: Windows, Linux Python versions:: 2.4 - 3.3 One pure Python script, runs on CPython / IronPython / PyPy , Version 3.3 / 3.2 / 3.1 / 2.4 / 2.5 / 2.6 / 2.7 , Win / Linux , 32 / 64 bit. Almost totally same usage as pyodbc ( can be seen as a re-implementation of pyodbc in pure Python ). Simple - the whole module is implemented in a single python script with less than 3000 lines. === mxODBC Connect === URL:: http://www.egenix.com/products/python/mxODBCConnect/ License:: eGenix Commercial License 1.3.0 Platforms:: Client: all Python platforms; Server: Windows, Linux Python versions:: 2.5 - 2.7 mxODBC Connect is a commercial client-server product that allows connecting Python to ODBC compatible databases running on remote servers without requiring an ODBC driver on the client side. The product uses mxODBC on the server side and provides a highly portable Python library for the client side. As such it supports all database backend that mxODBC supports, but allows connecting to these from many different Python-supported platforms. mxODBC Connect supports asynchronous query execution via the popular [[http://www.gevent.org/|gevent package]], provides secure certificate based authentication, SSL encrypted database connections, comes with full support for stored procedures, multiple result sets, Unicode, a common interface on all platforms and implements [[http://www.egenix.com/products/python/mxODBCConnect/#Features|many other useful features]]. mxODBC Connect Server is compatible with the [[http://www.postgresql.org/ftp/odbc/versions/|PostgreSQL ODBC drivers]]. === Other Python Interfaces for PostgreSQL === These entries still need to be updated to the standard format (see above): * PoPy: http://sourceforge.net/projects/popy * No activity since 2003 * pgasync: http://jamwt.com/pgasync/ * Asynchronous and pure Python. Speed comparable to C bindings. Special support for Twisted. * bpgsql: http://barryp.org/software/bpgsql/ * Barebones pure-Python PostgreSQL client * [[sipPQ]] ---- |
|
Line 79: | Line 181: |
== Pros == == Cons == |
* [[Zope]] * DbDoc * three PostgreSQL drivers (using pgdb, included with the PostgreSQL distro, pypgsql, and psycopg) exist for [[PyDO]] (Python Data Objects) |
PostgreSQL
- URL
- licence
- BSD
- platforms
Unix, win32 (NT-based Microsoft operating system)
Pros
From the features page:
- Good compliance with SQL standards
- Supports many SQL features
- Foreign keys
- Implements all SQL99 join types: inner join, left, right, full outer join, natural join
- Subqueries
- UNION and UNION ALL, INTERSECT and EXCEPT
- Views
- Triggers
- Support for international character sets, multibyte character encodings, Unicode
- Supports many languages for writing server-side functions/procedures and aggregates: Python, C, Perl, Tcl, PL/PgSQL, ...
- ACID compliant
- Support for rollback
- Serializable transaction isolation
- Multi-Version Concurrency Control (MVCC) for highly scalable concurrent applications
Cons
- [To be written]
DB API 2.0 Drivers
psycopg2
- URL
- Licence
- LGPL
- Platforms
- Unix, win32
- Python versions
- 2.4, 2.5, 2.6, 2.7, 3.1, 3.2
- Maintenance
- Active development
Psycopg is the most popular PostgreSQL adapter for the Python programming language. At its core it fully implements the Python DB API 2.0 specifications. Several extensions allow access to many of the features offered by PostgreSQL.
Extended documentation available on http://initd.org/psycopg/docs/
PyGreSQL
- URL
- licence
- BSD-like
- platforms
- Unix, win32
- Python versions
- 2.6 thru 3.5
- Maintenance
- Last version released is 5.0 (2016-03-20)
pyPgSQL
- URL
- Licence
- BSD-like (depends on mxDateTime, which may be GPL-incompatible)
- Platforms
- Unix, win32
- Python versions
- 2.1 thru 2.3
- Maintenance
- Active, sporatic (as of 10/2003)
Extensions to DB API
The fetch methods on cursors return an instances of PgResultSet, which you can use to access rows by index (like in DB-API), dictionary-like or with attributes. This feature can be turned off for a slight performance boost.
- Support for PostgreSQL notifications in the low-level API.
mxODBC
- URL
- Licence
- eGenix Commercial License
- Platforms
- Windows, Linux, MacOS X, FreeBSD, Solaris, AIX
- Python versions
- 2.4 - 2.7
mxODBC is compatible with the PostgreSQL ODBC driver on Windows and Unix.
Note that you have to enable the advanced option "Use bytea for lo" in case you want to work with BLOBs.
pyodbc
- URL
- License
- MIT
- Platforms
- Windows, Linux, MacOS X, FreeBSD, Solaris, Any (source provided)
- Python versions
- 2.4 - 2.6
Actively maintained Open Source project.
Precompiled binaries are available for Windows. RedHat Enterprise Linux, Centos, and Fedora have precompiled RPMs available in their Extras repositories.
py-postgresql
- URL
- License
- BSD/MIT/PSF
- Platforms
- Any (windows installers available)
- Python version
- 3.x
- Maintenance
- Active development
Comments
Python 3 port of pg_proboscis and friends. Pure Python with C optimizations. Prepared statement driven APIs, PG-API.(DB-API is there as well).
Written with efficiency and flexibility in mind. Data is streamed in when requested to do so, and always is streamed in under DB-API.
txpostgres
- URL
- License
- MIT/X/Expat
- Platforms
- Any
A Twisted wrapper for asynchronous PostgreSQL connections.
Uses psycopg2, which exposes the async interfaces of the native PostgreSQL library, libpq.
Can be used as a drop-in replacement for Twisted's adbapi module when working with PostgreSQL. The only part that does not provide 100% compatibility is connection pooling, although pooling provided by txpostgres is very similar to the one Twisted adbapi offers.
pg8000
- URL
- License
- BSD
- Platforms
- Any
- Python version
- 2.5, 2.6, 2.7, 3.2, 3.3, 3.4
pg8000 is somewhat distinctive in that it is written entirely in Python and does not rely on any external libraries
Important: New maintenance fork including several bugfixes, compatibility features and extensibility enhancements similar to psycopg2 exposed functionalities. Up to date documentation
PyPyODBC (Pure Python ODBC)
- URL
- License
- MIT
- Platforms
- Windows, Linux
- Python versions
- 2.4 - 3.3
One pure Python script, runs on CPython / IronPython / PyPy , Version 3.3 / 3.2 / 3.1 / 2.4 / 2.5 / 2.6 / 2.7 , Win / Linux , 32 / 64 bit.
Almost totally same usage as pyodbc ( can be seen as a re-implementation of pyodbc in pure Python ).
Simple - the whole module is implemented in a single python script with less than 3000 lines.
mxODBC Connect
- URL
- License
- eGenix Commercial License 1.3.0
- Platforms
- Client: all Python platforms; Server: Windows, Linux
- Python versions
- 2.5 - 2.7
mxODBC Connect is a commercial client-server product that allows connecting Python to ODBC compatible databases running on remote servers without requiring an ODBC driver on the client side. The product uses mxODBC on the server side and provides a highly portable Python library for the client side. As such it supports all database backend that mxODBC supports, but allows connecting to these from many different Python-supported platforms.
mxODBC Connect supports asynchronous query execution via the popular gevent package, provides secure certificate based authentication, SSL encrypted database connections, comes with full support for stored procedures, multiple result sets, Unicode, a common interface on all platforms and implements many other useful features.
mxODBC Connect Server is compatible with the PostgreSQL ODBC drivers.
Other Python Interfaces for PostgreSQL
These entries still need to be updated to the standard format (see above):
PoPy: http://sourceforge.net/projects/popy
- No activity since 2003
pgasync: http://jamwt.com/pgasync/
- Asynchronous and pure Python. Speed comparable to C bindings. Special support for Twisted.
bpgsql: http://barryp.org/software/bpgsql/
- Barebones pure-Python PostgreSQL client