Book Image

MariaDB Cookbook

By : Daniel Bartholomew
Book Image

MariaDB Cookbook

By: Daniel Bartholomew

Overview of this book

Table of Contents (20 chapters)
MariaDB Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Installing the HandlerSocket Python client libraries


Python is another popular scripting language. This recipe is about installing the Python pyhs client library for HandlerSocket so that we can use it in our scripts.

Getting ready

Install the libhsclient library as described in the Installing the libhsclient library recipe earlier in this chapter.

We need to also install the mercurial and python-setuptools packages so that we can get the latest copy of the pyhs source code and install it.

On Red Hat, Fedora, or CentOS, run the following command:

sudo yum install mercurial python-setuptools

On Debian or Ubuntu, run the following command:

sudo apt-get install mercurial python-setuptools

We are now ready to install the HandlerSocket client libraries for Python.

How to do it...

  1. Clone a copy of the pyhs source code as follows:

    cd /usr/local/src/
    sudo hg clone http://bitbucket.org/excieve/pyhs 
    
  2. Change to the pyhs directory and edit the setup.py file by adding the following line after the four from...