MySQL Connector/Python v1.1.6 GA

This week we released MySQL Connector/Python v1.1.6 has been released with a fix for the Django backend. If you wonder (or not?) where Connector/Python v1.1.5, it got released a few weeks ago. Yes, PyPi has been updated! Don’t forget to use --allow-external using newest pip. Some useful links: Documentation: http://dev.mysql.com/doc/connector-python/en/index.html Release Notes: http://dev.mysql.com/doc/relnotes/connector-python/en/index.html Downloads: http://dev.mysql.com/downloads/connector/python/#downloads Feedback: http://bugs.mysql.com Forum: http://forums.mysql.com/list.php?50

MySQL Connector/Python v1.1.4 GA

It has been a busy week for the Pythonic MySQL Team at Oracle: MySQL Utilities 1.3.6 and a brand new Utilities 1.4.1 Alpha has been release which includes Fabric. Yes, and of course, the one binding them all: Connector/Python v1.1.4 has been released as GA (General Available). Check out the Change History if you want to keep up with what is being added and changed. New features found in v1.1:

MySQL Connector/Python v1.1.3 beta

Connector/Python v1.1.3 is available for testing since last week. It is a “beta” release, so it would be great if we even get more feedback. Check out the Change History if you want to keep up with what is being added and changed. Notable changes for v1.1.3 include a fix for encoding using \x5c or backslashes in multi-byte characters. We also made the code more PEP-8 compliant, which we think is quiet important.

Snippet: Show column information using MySQL Connector/Python

Problem You have a query executed by MySQL Connector/Python and would like to show column information nicely on the console. Solution Every cursor object has a description property. This can be used to show information about the columns in a result set. columns = [] maxnamesize = 0 for coldesc in cur.description: coldesc = list(coldesc) coldesc[2:6] = [] columns.append(coldesc) namesize = len(coldesc[0]) if namesize > maxnamesize: maxnamesize = namesize fmt = "{{nr:3}} {{name:{0}}} {{type:12}} {{null}}".