A Python client for accessing Kyoto Tycoon using binary protocol
Project description
A Python client for accessing Kyoto Tycoon using 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
Environment
OS: Mac OS X 10.8.5
CPU: Intel Core i7 2GHz
Memory: 8GB
Python: 2.7.3
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for python-kyototycoon-binary-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3787bea5aed3d255bd091eb57798b8c893a338df77a0424861283468e72e6f7 |
|
MD5 | 2932e0d1fcfdc8ebc98f615629badd61 |
|
BLAKE2b-256 | dc9272c7695e7a3e792d5fea638b38a5092e9cfe5353d6cdde6c6f3ae5c0ffa7 |