Using python on the web

D'Arcy J.M. Cain darcy at vex.net
Fri Apr 21 06:44:36 EDT 2000


Boudewijn Rempt <boud at rempt.xs4all.nl> wrote:
> Brent Fulgham <brent.fulgham at xpsystems.com> wrote:

>> Of course, the Postgres Python bindings may be just as bad from your
>> perspective.  :-)

> Well, the Postgres Python bindings don't even conform to the
> DB-API II specs - that kind of rules them out for a lot of

The next release will have DB-API support.  I (the PyGreSQL maintainer)
don't know much about the spec so I invite any and all criticism as long
as it comes with code patches on our mailing list so that others on the
team can review them before they become part of the package.  I expected
to have a release by this weekend but there appears to be a few small
problems to clear up yet.

> work. I myself am quite satisfied with the MySQL bindings, but
> like the original poster, I had to write my own object layer
> around the primitive functions. Maybe it would be a good idea
> to have another standard layer on top of DB-API II, for those
> who want a more sophisticated interface?

Actually, I kind of like the original PyGreSQL interface, especially with
the dictresult() method.  I am thinking of adding a few more convenience
methods like that.  For example, a method that takes a select and returns
a dictionary of dictionaries rather than a list of dictionaries.

http://www.druid.net/pygresql/ for details.

-- 
D'Arcy J.M. Cain <darcy at vex.net>           |  Democracy is three wolves
http://www.vex.net/                        |  and a sheep voting on         
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



More information about the Python-list mailing list