Showing entries 191 to 200 of 378
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: Python (reset)
MySQL Connector/Python v1.0.6 beta available

We released the second beta of MySQL Connector/Python v1.0. You can download v1.0.6 from the MySQL website and the change history can be found in the online manual.

Usually, beta releases do not have big changes, but we had to push some code which did not make the previous one and it really had to go into v1.0. The exceptions raised by Connector/Python are now mapped against the ‘SQLState’ found in the MySQL server errors. This makes it much easier to maintain and clearer which exception can be expected. It is, however, possible to override how errors are …

[Read more]
ConFoo 2013: Call for Papers is Now Open!

ConFoo is one of the most important web developer-oriented conferences. ConFoo 2013 will be held on February 25 through March 1 in Montreal, Canada.

We just opened call for papers and we are looking for the best PHP, Java, Ruby, DotNet,HTML5 experts who are willing to share their knowledge with the Canadian community. Candidates can submit proposals until September 23. Consult the call for papers page for details and to start submitting. That page also explains what expenses ConFoo can cover for speakers. You can also get advice on how to write proposals.

The call for papers is public, meaning that all proposals get published on the website for others to vote and comment on. This approach allows the organizers to pick subjects that have …

[Read more]
Separate docs for MySQL Connectors

The MySQL documentation section has always had this Topic Guides page containing links to the docs for the various MySQL Connectors -- the official database drivers for various languages and programming technologies. That is the most convenient way to get the information for each Connector in PDF form, rather than downloading the entire Ref Man PDF. For HTML, it was more of a shortcut, because

Fetching rows as dictionaries with MySQL Connector/Python (revised)

It is possible with MySQL Connector/Python to define your own cursor classes. A very good use case is to return rows as dictionary instead of tuples. This post shows how to do this using MySQL Connector/Python v1.0 and is an update for an older blog entry.

In the example below we are subclassing the MySQLCursor class to create a new class called MySQLCursorDict. We change the _row_to_python() method to return a dictionary instead of a tuple. The keys of the dictionary will be (unicode) column names.

from pprint import pprint
import mysql.connector

class MySQLCursorDict(mysql.connector.cursor.MySQLCursor):
    def _row_to_python(self, rowdata, desc=None):
        row = super(MySQLCursorDict, self)._row_to_python(rowdata, desc)
        if …
[Read more]
MySQL Connector/Python Launchpad entry updated

We finally got the MySQL Connector/Python repositories reorganised on Launchpad. The following changes have been made:

  • Old, unmaintained repositories have been marked as obsolete.
  • Downloadable source distributions of obsolete versions have been removed, use the MySQL download website.
  • Connector/Python v1.0 source has been uploaded to Launchpad up till v1.0.5b1.
  • URLs point to the MySQL website.
  • Maintainer is now ‘Oracle/MySQL Engineering’, the team I (Geert Vanderkelen) am part of.
MySQL Workbench Utilities – Clone MySQL users with mysqluserclone

This post is one in a series that I will be doing on MySQL Workbench Utilities – Administer MySQL with Python Scripts.

MySQL Utilities are a part MySQL Workbench. The utilities are written in Python, available under the GPLv2 license, and are extendable using the supplied library. They are designed to work with Python 2.x greater than 2.6. If you don’t have Workbench, you may download the MySQL Utility scripts from launchpad.net. You will also need to …

[Read more]
MySQL Workbench Scripts

It’s always interesting when somebody asks why they got an error message, and especially sweet when you’re working on something related that lets you answer the question. They were using MySQL Workbench and wanted to know why they couldn’t open a SQL script file by clicking on the Scripting menu option.

As I explained to the individual who asked, you should always click the Edit SQL Script link in the SQL Development section of the MySQL Workbench home page to work on SQL scripts. The Scripting menu option supports Python and Lua plug-ins development and scripts.

They did the following initially, which led down the rabbit warren and left them stumped because they don’t know anything about Python or Lua. This is provided to those who choose to experiment with this advanced feature of MySQL Workbench.

[Read more]
MySQL Connector/Python 1.0.5 beta available through PyPI

Yesterday we announced the availability of MySQL Connector/Python v1.0.5 beta. Today I’ve made it available on PyPI so it can be easily installed. Note that I did remove the old development release and when you upgrade or try v1.0.5, you should check the ChangeLog.

shell> pip install mysql-connector-python

For those wondering why the name includes ‘python’: it’s just to align it with other MySQL connectors and to keep the name consistent with other distribution types.

We welcome and appreciate feedback and comments for this first beta release through the forum and the …

[Read more]
MySQL Connector/Python v1.0.5 beta available for download

MySQL Connector/Python v1.0.5 beta is now available for download from the MySQL website. This version is feature complete and we welcome and appreciate feedback and bug reports.

We’re also interested in hearing your feedback for future enhancements. Let us know how you’re using the connector too, especially if you are using it with Django, SQLAlchemy and similar Python technologies.

A few things have changed since the last development releases and we hope the manual shipping with the Connector/Python distribution (and also available online soon) will help you get up to speed.

Here are a few important changes that might be incompatible with current scripts using the now obsolete development releases v0.3.2 and …

[Read more]
Naming a Python package for distribution?

I’m currently figuring out how to name the MySQL Connector/Python distributions so it works well with PyPi. Source archives would be named like mysql-connector-python-X.Y.Z.tar.gz.

The ‘name’ metadata would be ‘MySQL Connector Python’, thus without any underscores or dashes. This works OK, but if people have objections, please leave a comment.

Showing entries 191 to 200 of 378
« 10 Newer Entries | 10 Older Entries »