Skip to content

marilyne/eece411-kvclient

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EECE 411 - Key Value Client

image

Installation

Depending on your platform, you may need gcc or another c compiler install in order to compile gevent. On Ubuntu installing python-dev is sufficient.

To install, simply:

pip install git+git://github.com/squirly/eece411-kvclient.git

Usage

To use the basic Key Value client:

from kvclient import KeyValueClient, InvalidKeyError

SERVER = 'squirly.ca:9090'
KEY = 'my_key'
VALUE = 'the value to be saved'

client = KeyValueClient(SERVER)
client.put(KEY, VALUE)
print(client.get(KEY))
client.delete(KEY)
try:
    client.get(KEY)
except InvalidKeyError, error:
    print(str(error))

To run tests:

from testing.test_types import get_test_from_string
from pprint import pprint

SERVER = 'squirly.ca:9090'
TEST_NAME = 'simple_compliance'

test = get_test_from_string(TEST_NAME, [SERVER])

results = test.run()

for result in results:
    pprint(result.to_dict())

Development

Getting the code:

git clone git://github.com/squirly/eece411-kvclient.git
cd eece411-kvclient

To run the tests:

python setup.py test

To contribute changes, make a pull request on Github.

About

The client implementation for EECE 411 Distributed Key Value Store Project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%