https://github.com/heavenshell/py-okuyama
Distributed key-value-store okuyama's Python client.
https://github.com/heavenshell/py-okuyama
Last synced: 2 months ago
JSON representation
Distributed key-value-store okuyama's Python client.
- Host: GitHub
- URL: https://github.com/heavenshell/py-okuyama
- Owner: heavenshell
- License: bsd-3-clause
- Created: 2014-11-22T08:36:10.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-05-27T13:53:57.000Z (about 8 years ago)
- Last Synced: 2025-03-06T02:12:11.320Z (over 1 year ago)
- Language: Python
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
okuyama
=======
.. image:: https://travis-ci.org/heavenshell/py-okuyama.svg?branch=master
Distributed key-value-store okuyama's Python client.
Usage
-----
Connect to MasterNode.
.. code::
from okuyama import Client
client = Client()
client.auto_connect(['masternode1:8888', 'masternode2:8888'])
Set value
.. code::
print(client.set('key', 'val')) # => True
print(client.get('key')) # => 'val'
Remove value
.. code::
print(client.delete('key')) #=> True
print(client.delete('key')) #=> None
Set tags
.. code::
print(client.set('key1', 'val1', tags=['tag1'])) #=> True
print(client.set('key2', 'val2', tags=['tag1', 'tag2'])) #=> True
Get keys from tag
.. code::
print(client.execute('get_keys_by_tag', tag='tag1'])) #=> [key1, key2]