python client to riak

Matthew Heitzenroder mheitzenroder at gmail.com
Wed Jul 7 11:45:28 EDT 2010


Robert-

Take a look at the tests in the python client here:
http://github.com/basho/riak-python-client/blob/master/riak/tests/test_all.py

You want to see how to create a client, then create a bucket, then create
objects for that bucket.  It looks a bit like this:

from riak import *

client = RiakClient()
bucket = client.bucket("foo")
obj = bucket.new("some_key", {"key":"value"})
obj.store

Then, if you want to make sure it go there, do something like:

curl http://localhost:8098/riak/foo/some_key | python -m json.tool

and you'll get some JSON back.

Matt

On Wed, Jul 7, 2010 at 10:07 AM, robert schaefer <rps at haystack.mit.edu>wrote:

>  Any help with examples for using the python client to Riak?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20100707/18777fc4/attachment.html>


More information about the riak-users mailing list