Riak - Python script to load key-value data into Riak buckets

490 views Asked by At

I have no prior experience with Riak and I am just starting to work on it.

I have data that I would like to load into Riak buckets. For that, I first need to create buckets on the Riak cluster. Are there any example scripts (preferably, in Python) out there that I can refer to do all this - creating buckets + loading data? I did a quick Google search but could not find anything specific.

Any hints/info that can guide me would be really helpful. Thanks in advance.

1

There are 1 answers

0
mbb On BEST ANSWER

I'd recommend walking through the Zombie Riak app. The application stack is forked from this inverted index code written in Ruby, which isn't a big leap to Python. Some notes:

  • riak_hosts.rb shows how it connects to the Riak KV cluster
  • load_data.rb is a simple loading process with regular updates
  • models/zombie.rb shows you the schema