3203
Comment: converted to 1.6 markup
|
4262
|
Deletions are marked like this. | Additions are marked like this. |
Line 44: | Line 44: |
=== psycopg === | === psycopg1 === |
Line 46: | Line 46: |
URL:: http://initd.org/software/initd/psycopg | URL:: http://initd.org/software/initd/psycopg1 |
Line 50: | Line 50: |
Maintenance:: Active development, frequent updates (as of 10/2003) | Maintenance:: development stalled (as of 12/2008) |
Line 61: | Line 61: |
=== psycopg2 === URL:: http://initd.org/software/initd/psycopg2 Licence:: GPL Platforms:: Unix, win32 (beta) Python versions:: Maintenance:: Active development |
|
Line 84: | Line 92: |
Note that you have to enable the advanced option "Use bytea for lo" in case you want to work with BLOBs. === Other Python Interfaces for PostgreSQL === These entries still need to be updated to the standard format (see above): * PoPy: http://sourceforge.net/projects/popy * PoPy and PyGreSQL are [[http://www.zope.org/Members/tm/Full_Announce|merging]] * pg/python: http://python.projects.postgresql.org/ * pg_proboscis: DB-API 2.0 and GreenTrunk Interfaces http://python.projects.postgresql.org/project/pg_proboscis.html * pg_pqueue: PQ 3.0 Protocol elements http://python.projects.postgresql.org/project/pg_pqueue.html * 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]] |
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
- Native Windows version is implemented in the PostgreSQL 8.x version, and just for Windows NT 4.0 / 2000 / XP / 2003. For running on other Windows platform or an older version than 8.0 there is a Cygwin version.
DB API 2.0 Drivers
PyGreSQL
- URL
- licence
- BSD-like
- platforms
- Unix, win32
- Python versions
- 1.5.2 thru 2.4
- Maintenance
- Last version released is 3.8.1 (2006-06-05)
psycopg1
- URL
- Licence
- GPL
- Platforms
- Unix, win32 (beta)
- Python versions
- Maintenance
- development stalled (as of 12/2008)
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.
Offers a few advanced features over PoPy
Win32 binaries can be found here http://www.stickpeople.com/projects/python/psycopg/
psycopg2
- URL
- Licence
- GPL
- Platforms
- Unix, win32 (beta)
- Python versions
- Maintenance
- Active development
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.1 - 2.5
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.
Other Python Interfaces for PostgreSQL
These entries still need to be updated to the standard format (see above):
pg/python: http://python.projects.postgresql.org/
pg_proboscis: DB-API 2.0 and GreenTrunk Interfaces http://python.projects.postgresql.org/project/pg_proboscis.html
pg_pqueue: PQ 3.0 Protocol elements http://python.projects.postgresql.org/project/pg_pqueue.html
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