tags:

views:

528

answers:

3

I need a great resource for interacting with MySql (version 5.0.45) with Python2.6.

I'm using cherrypy, mako, the standard library, and nothing else.

The resources can be blogs, howtos, books (online of offline), whatever.

Additional information:

The python mysql module, MySQLdb, is compatible with Python DB-API 2.0 . See http://sourceforge.net/projects/mysql-python.

+2  A: 

Python connectivity to DBs is accomplished (most of the times) through the DBI (Python Database API). The Python DBI has 2 versions and their documentation is the place for you to start: v.1 and v.2. You must check what version is supported by the MySQL connector and use the corresponding spec version.

For more details about Python and MySQL, you can find good articles on Using MySQL With Python and here is the article that walks you through most of the operations: Writing MySQL Scripts with Python DB-API

./alex

alexpopescu
I had already found the "Writing MySQL Scripts with Python DB-API article. The reason I was asking SO was that the article is from 2006 and wanted to see if there was anything fresher out there... But thanks anyway!
Christopher Mahan
You'll probably find more recent entries, but what you actually need to read and know is the DBI spec (because that's exactly how you'll use the MySQL driver).
alexpopescu
Not much has changed between '06 and now. That's why there's a Python DBI spec -- to slow the pace of change.
S.Lott
+1  A: 

MySQL and Python discussions: http://forums.mysql.com/list.php?50

Nice link! Thanks.
Christopher Mahan
A: 

Can anyone tell me where we can get python2.6 for Windows supported MYSQL egg or installation. from tar file I tried to install, I get an error vcvarsall.bat not found etc. I believe I am using Python and not VisualStudio. Why can't we have an independant install for MYSQL rather than depending on stuff

Cheers! Rahul