Skip to main content

A Python client for accessing Kyoto Tycoon via binary protocol

Project description

https://badge.fury.io/py/python-kyototycoon-binary.png https://travis-ci.org/studio-ousia/python-kyototycoon-binary.png?branch=master

A lightweight Python client for accessing Kyoto Tycoon via its binary protocol.

The specification of the binary protocol is explained here.

Installation

$ pip install Cython
$ pip install python-kyototycoon-binary

Basic Usage

>>> from bkyototycoon import KyotoTycoonConnection
>>> client = KyotoTycoonConnection()
>>> client.set_bulk({'key1': 'value1', 'key2': 'value2'})
2
>>> client.get_bulk(['key1', 'key2', 'key3'])
{'key2': 'value2', 'key1': 'value1'}
>>> client.remove_bulk(['key1', 'key2'])
1
>>> client.get_bulk(['key1', 'key2', 'key3'])
{'key1': 'value1'}

Performance

In our benchmark tests, python-kyototycoon-binary was about 6-8 faster than python-kyototycoon.

$ pip install python-kyototycoon
$ ktserver -dmn
$ python benchmarks/benchmark.py
python-kyototycoon-binary get_bulk qps: 30961
python-kyototycoon-binary set_bulk qps: 40320
python-kyototycoon-binary get_bulk_with_pool qps: 31722
python-kyototycoon-binary set_bulk_with_pool qps: 42961
python-kyototycoon get_bulk qps: 4394
python-kyototycoon set_bulk qps: 4534

Documentation

Documentation is available at http://python-kyototycoon-binary.readthedocs.org.

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-kyototycoon-binary, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size python-kyototycoon-binary-0.1.5.tar.gz (53.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page