python client to riak

robert schaefer rps at haystack.mit.edu
Wed Jul 7 14:33:44 EDT 2010


Matt and Grant,

  Thank you!

I just needed to change obj.store to  obj.store()

bob s.

On Jul 7, 2010, at 11:45 AM, Matthew Heitzenroder wrote:

> 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?
> 
> !DSPAM:4c34ae15183393487119!

-----------------------------------
robert schaefer
Atmospheric Sciences Group
MIT Haystack Observatory
Westford, MA 01886

email:  rps at haystack.mit.edu
voice:  781-981-5767
www:  http://www.haystack.mit.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20100707/54d6af02/attachment.html>


More information about the riak-users mailing list