python postgres drivers
Researching postgres drivers for python:
- overview of python/postgres/zope - includes a list of the various postgres drivers he looked at
- PyGreSQL
- Includes two apis: a simpler "classic" interface, and a db-api compliant interface
- The classic interface is nice and simple, but requires OIDs on all the tables, and requires OIDs to submit an update.
- The DB-API interface has no documentation for it ("This section of the documentation still needs to be written.)
- Available as a pkg under debian/ubuntu ("python-pygresql")
- psycopg1
- Seems to be used by lots of folks.
- "not under active development anymore; Bugs are still fixed but no new features will be added for any reason. psycopg 2 is the active branch where most development goes on."
- Provides dictionary result sets via dictfetchall().
- Calls connect with one long string ('host=%s dbname=%s' % ("myhost", "mydb")) rather than parameters (host="myhost", dbname="mydb"). Seems .. non-pythonish.
- Not available as an ubuntu pkg.
- psycopg2
- "an almost complete rewrite" of psycopg1. From the FAQ: "Q: Why is a rewrite of psycopg required? A: don't know.."
- Provides dictionary result sets via cursor_factory = psycopg.extras.DictCursor and the normal fetchall().
- Not available as an ubuntu pkg.
- PostgresPy
- Very .. hard to grok. (what is "green trunk?")
- Requires specifying post and username in connect, even though we want to use the default port and default user, argh..
- PoPy
- Requires mxdatetime.h header file, which is not in the standard debian pkg
- pyPgSQL
- Has a debian/ubuntu pkg ("python-pgsql")

