Showing entries 51 to 60 of 378
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: Python (reset)
Auto-Refreshing Reports in MySQL Shell

Tweet

MySQL Shell makes it easy to develop tools you can use for example to generate reports. In a previous blog, I showed how to use external modules in MySQL Shell. In this blog, I will take it one step further and use the curses Python module to create auto-refreshing reports. The first example will be kept very simple to show the idea, then a more realistic example will be shown where the top N files sorted by I/O will be returned.

Note

Out of the box, this does not work on Windows as Python does not ship with the curses library.

Basic Example

As a basic example, consider the query SELECT NOW(). This returns …

[Read more]
Using Django with MySQL 8

Tweet

A framework can be a great way to allow you to spend more time on the actual application or web site and less time on standard tasks. It can also greatly reduce the amount of custom code needed. Django is one of the best known web frameworks for Python, and the good news is that it works out of the box with MySQL Server 8 and MySQL Connector/Python 8. This blog will look at how to use Django with MySQL 8.

There actually is very little to get Django to work with MySQL 8. Just install it, configure Django to use MySQL Connector/Python as a backend, and that’s it. From the Django point of view, you just have to configure the database option in settings.py to use MySQL Connector/Python and your database settings, for example:

DATABASES = { …
[Read more]
Slides and Workbooks From Oracle OpenWorld & CodeOne

Tweet

First of all, thanks to everyone who attended my sessions at the recent Oracle OpenWorld and Code One in San Francisco. It was a great privilege to be allowed to make a number of presentations.

All of the workbooks and scripts from the hands-on labs (HOL) and the slides from the talks have been made available at OpenWorld’s and Code One’s session catalogues. You can download the files by using the OpenWorld catalog searching for my name or the session number (see below). Click on the download icon for each of the presentations you are interested in.

[Read more]
MySQL Connector/Python 8.0.13 has been released

Dear MySQL users,

MySQL Connector/Python 8.0.13 is the third GA release version of the
MySQL Connector Python 8.0 series. This series adds support for Python
3.7. The X DevAPI enables application developers to write code that
combines the strengths of the relational and document models using a
modern, NoSQL-like syntax that does not assume previous experience
writing traditional SQL.

To learn more about how to write applications using the X DevAPI, see
http://dev.mysql.com/doc/x-devapi-userguide/en/. For more information
about how the X DevAPI is implemented in MySQL Connector/Python, and its
usage, see http://dev.mysql.com/doc/dev/connector-python.

For general documentation about how to get started using …

[Read more]
NoSQL/X DevAPI Tutorial with MySQL Connector/Python 8.0

Tweet

The MySQL Document Store became general available (GA) with MySQL 8. One of the nice features of the MySQL Document Store is the X DevAPI that allows you to query the data from a multitude of programming languages using the same API (but while retaining the conventions of the language). The programming languages with support for the X DevAPI includes JavaScript (Node.js), PHP, Java, DotNet, and C++.

I will be using MySQL Connector/Python 8.0.12 for the example in this blog. The example is executed on Microsoft Windows with Python 3.6 installed, but it has also been tested on Oracle Linux 7 with Python 2.7. I do assume that MySQL Connector/Python has been installed. If that is not the case, you can read how to do it in the …

[Read more]
MySQL Connector/Python 2.1.8 has been released

Dear MySQL users,

MySQL Connector/Python 2.1.8 GA is a sixth GA version of 2.1 release
series of the pure Python database driver for MySQL. It can be used for
production environments.

MySQL Connector/Python version 2.1.8 GA is compatible with MySQL Server
versions 5.5 and greater. Python 2.6 and greater as well as Python 3.4
and greater are supported. Python 2.4, 2.5, and 3.1, 3.2, 3.3 are not
supported.

MySQL Connector/Python 2.1.8 is available for download from:

http://dev.mysql.com/downloads/connector/python/#downloads

MySQL Connector/Python 2.1.8 (Commercial) will be available for download
on the My Oracle Support (MOS) website. This release will be available
on eDelivery (OSDC) in next month’s upload cycle.

The ChangeLog file included in the …

[Read more]
MySQL Connector/Python on iOS Using Pythonista 3

Tweet

One of the nice things about MySQL Connector/Python is that it is available in a pure Python implementation. This makes it very portable. Today I have been exploring the possibility to take advantage of that to make MySQL Connector/Python available on my iPad.

There are few Python interpreters available for iPad. The one I will be discussing today is Pythonista 3 which has support for both Python 2.7 and 3.6. One of the things that caught my interest is that it comes with libraries to work with iOS such as accessing the contact and photos as well as UI tools. …

[Read more]
MySQL Shell: Built-In Help

Tweet

It can be hard to recall all the details of how a program and API work. The usual way to handle that is to look at the manual or a book. Another – and in my opinion – nice way is to have built-in help, so you can find the information without changing between the program and browser. This blog discuss how to obtain help when you use MySQL Shell.

MySQL Shell is a client that allows you to execute queries and manage MySQL through SQL commands and JavaScript and Python code. It is a second generation command-line client with additional WebOps support. If you have not installed MySQL Shell yet, then you can download it from MySQL’s community downloads, Patches & Updates in …

[Read more]
MySQL Shell: Using External Python Modules

Tweet

MySQL Shell is a great tool for working with MySQL. One of the features that make it stand out compared to the traditional mysql command-line client is the support for JavaScript and Python in addition to SQL statements. This allows you to write code you otherwise would have had to write outside the client. I showed a simple example of this in my post about the instant ALTER TABLE feature in MySQL 8.0.12 where a Python loop was used to populate a table with 1 million rows This blog will look further into the use of Python and more specifically external modules.

[Read more]
New Book: MySQL Connector/Python Revealed

Tweet

When you write programs that uses a database backend, it is necessary to use a connector/API to submit the queries and retrieve the result. If you are writing Python programs that used MySQL, you can use MySQL Connector/Python – the connector developered by Oracle Corporation.

Now there is a new book dedicated to the usage of the connector: MySQL Connector/Python Revealed, which is published by Apress. It is available in a softcover edition as well as an eBook (PDF, ePub, Mobi).

The book is divided into four parts spanning from the installation to error handling and troubleshooting. …

[Read more]
Showing entries 51 to 60 of 378
« 10 Newer Entries | 10 Older Entries »