Python and Sybase

John J. Lee jjl at pobox.com
Thu Sep 23 16:50:21 EDT 2004


David Rysdam <drysdam at ll.mit.edu> writes:

> What module is most recommended for accessing Sybase from Python?
> This one: http://www.object-craft.com.au/projects/sybase/sybase/  ?

As far as I know, that's the only one.


> Also, is there any module that provides a generic DB API and can be
> hooked to both Sybase and postgresql?  This
> (http://www.python.org/peps/pep-0249.html) looks pretty old.

Not a single module -- why would you want one?

The DB API (version 2) is the standard.  The idea of the DB API is to
make it possible to write DB API code that works across multiple
database backends.  No need at all for a single module, just a single
standard.  Unfortunately, making this work is not entirely trivial:
There are some stupid issues that are the fault of the DB API -- SQL
argument substitution syntax in particular -- and some trickier ones
-- particularly the variations in the capabilities of DBMSes.  If you
want your code to work across multiple DBMS backends, you should test
it with those DBMSes from the start.  Doing it later is possible but
may be hard work (made less difficult if you keep your DB code
localised).


John



More information about the Python-list mailing list