Skip to main content

HandlerSocket client for Python

Project description


pyhs (python-handler-socket) is a Python client library for the HandlerSocket MySQL plugin.


First, install MySQL and HandlerSocket. Some of the client’s functionality depends on latest revisions of the plugin so keep it up to date.

After that, get the distribution:

pip install python-handler-socket

Or get the package from latest source:

pip install hg+

Or clone the main repository and install manually:

hg clone
cd pyhs
python install

Check your installation like this:

>>> from pyhs import __version__
>>> print __version__


Usage cases, details and API reference are available in docs directory inside the package or online on RTD.



  • Fixed infinite loop caused by remotely closed connection.
  • Fixed incorrect Unicode chars escaping/unescaping in C speedups.
  • Fixed indexes and caches might not be cleaned on connection errors.
  • Somewhat refactored error recovery code.


  • Fixed single result single-column responses. Fixes issue #1 for real now, I hope.


  • Fixed incorrect behavior with single columns responses.
  • Changed return value of find_modify calls with return_original=True to a list of rows of (field, value) tuples instead of a flat list of values.


  • Implemented optimised C versions of encode and decode.
  • Modified installation script to include optional building of C speedups module.


  • Added “incr” and “decr” operations support to the find_modify call.
  • Added increment and decrement methods to the Manager class.
  • Added original value result for all find_modify operations.
  • Optimised query string encoding function.


  • Initial release.


pyhs is released under MIT license.
Copyright (c) 2010 Artem Gluvchynsky <>

See LICENSE file inside the package for full licensing information.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for python-handler-socket, version 0.2.4
Filename, size File type Python version Upload date Hashes
Filename, size python-handler-socket-0.2.4.tar.gz (21.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page