[DB-SIG] perl-DBI like module for Python?
stuart.b at commonground.com.au
Wed May 26 08:02:45 EDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
On 24/05/2004, at 4:57 PM, Mihai Ibanescu wrote:
> I am not sure if it was mentioned before on this list.
> Is there a module that does what the perl DBI module does?
> What I mean by that is: a top-level module that exposes the API
> defined in the
> DB API document, but with the ability to change backend drivers on the
The drivers have enough functionality that this extra layer is
generally not needed. The major desire for such a library
would be to standardize the parameter style used.
> Example: I have my application running against Postgres. I have to be
> able to
> port it to Oracle too. Unfortunately, code that tries to catch
> DatabaseException will have to look for the cx_Oracle
> DatabaseException, not
> for the postgres one.
The exceptions are most likely exposed through your connection object
(I think most the major drivers support this option now?).
cur = con.cursor()
cur.excecute('select foo from bar')
Stuart Bishop <stuart at stuartbishop.net>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
-----END PGP SIGNATURE-----
More information about the DB-SIG