Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Is there no single/uniform RDBMS access API module for Python ?

0 views
Skip to first unread message

Laszlo Nagy

unread,
May 12, 2008, 2:42:01 AM5/12/08
to Banibrata Dutta, pytho...@python.org
Banibrata Dutta írta:
> Hi,
>
> Again a noob question.
>
> Based on this URL http://wiki.python.org/moin/DatabaseInterfaces , is
> it correct to conclude that there is no RDBMS agnostic, single/uniform
> DB access API for Python ?
> Something in the lines of JDBC for Java, DBD for Perl etc. ?
>
> How is the RDBMS change handled for solutions which need to work with
> different RDBMSs ??
http://www.python.org/dev/peps/pep-0249/

Gabriel Genellina

unread,
May 12, 2008, 6:11:21 AM5/12/08
to pytho...@python.org
En Mon, 12 May 2008 03:52:59 -0300, Banibrata Dutta <banibra...@gmail.com> escribió:

> Found that SnakeSQL does implement DB2.0 API. However are there such
> implementations for MySQL ?

MySQLdb

--
Gabriel Genellina

Peter Decker

unread,
May 12, 2008, 10:40:26 AM5/12/08
to Banibrata Dutta, pytho...@python.org
On Mon, May 12, 2008 at 1:45 AM, Banibrata Dutta
<banibra...@gmail.com> wrote:

> > > Based on this URL http://wiki.python.org/moin/DatabaseInterfaces , is
> it correct to conclude that there is no RDBMS agnostic, single/uniform DB
> access API for Python ?
> > > Something in the lines of JDBC for Java, DBD for Perl etc. ?
> > > How is the RDBMS change handled for solutions which need to work with
> different RDBMSs ??
> > >
> >
> > http://www.python.org/dev/peps/pep-0249/
> >
>

> That appears to be only an API specification. Are there any implementations
> of that ?

You might want to take a look at Dabo (http://dabodev.com). They have
a backend-agnostic interface for working with different databases. I
don't do database apps myself, so I can't comment on how well it
works, but based on the comments of others on the Dabo email lists, it
seems as though it works well enough.

--

# p.d.

Daniel Fetchinson

unread,
May 12, 2008, 1:19:55 PM5/12/08
to pytho...@python.org
> >> Again a noob question.

> >> Based on this URL http://wiki.python.org/moin/DatabaseInterfaces , is it
> >> correct to conclude that there is no RDBMS agnostic, single/uniform DB
> >> access API for Python ?
> >> Something in the lines of JDBC for Java, DBD for Perl etc. ?
> >> How is the RDBMS change handled for solutions which need to work with
> >> different RDBMSs ??
> >>
> > http://www.python.org/dev/peps/pep-0249/
> >
>
>
> That appears to be only an API specification. Are there any implementations
> of that ?

For sqlite: http://oss.itsystementwicklung.de/trac/pysqlite/ if you
have python < 2.5 for 2.5 and up it is included in the stdlib

For mysql: http://sourceforge.net/projects/mysql-python

There are a tons more, including postgresql, oracle, etc:
http://wiki.python.org/moin/DatabaseInterfaces

Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown

M.-A. Lemburg

unread,
May 13, 2008, 6:52:32 AM5/13/08
to Banibrata Dutta, Python-list
On 2008-05-12 07:43, Banibrata Dutta wrote:
> Hi,

>
> Again a noob question.
>
> Based on this URL http://wiki.python.org/moin/DatabaseInterfaces , is it
> correct to conclude that there is no RDBMS agnostic, single/uniform DB
> access API for Python ?
> Something in the lines of JDBC for Java, DBD for Perl etc. ?
>
> How is the RDBMS change handled for solutions which need to work with
> different RDBMSs ??

Most Python database modules adhere to the Python Database API specification
(DB-API). The current version 2 is available in the PEP format as:

http://www.python.org/dev/peps/pep-0249/

The spec was created and is maintained by the Python DB-SIG:

http://www.python.org/community/sigs/

If you are looking for a generic Python database interface, then I'd
suggest you have a look at our mxODBC:

http://www.egenix.com/products/python/mxODBC/

It works on all common Python platforms (e.g. Windows, Linux x86/x64,
Macs, Solaris, etc.) and provides the same API on these, so apart from
changing the ODBC driver configuration, you don't need to make any
major changes to your application if you want to switch from one
platform to another.

Note: mxODBC is a commercial add-on to our eGenix mx Base OSS
distribution. It's maintained by eGenix and has been around
since 1997.

--
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source (#1, May 13 2008)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________

:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::


eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611

0 new messages