Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A Riak client library for Twisted

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 debian
Octocat-spinner-32 protobuf
Octocat-spinner-32 riakasaurus
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.rst
Octocat-spinner-32 requirements.pip
Octocat-spinner-32 setup.py
README.rst

Riakasaurus

The Riak client library for Twisted with a silly name.

riakasaurus-ci

Installation

From source
# git clone git://github.com/calston/riakasaurus.git # cd riakasaurus # python setup.py install
From PyPi
# easy_install riakasaurus
From pip
# pip install riakasaurus

Usage

Riakasaurus uses inline deferreds, any operation that requires connecting to Riak will return a deferred. The usuage follows from the standard python library as much as possible:

from twisted.internet import reactor
from riakasaurus import riak

# Create a client object

client = riak.RiakClient()

# Create a bucket object
bucket = client.bucket('my_bucket')

# Create a new object
object = bucket.new('penguins', {'colors': ['white', 'black']})

def stored(*a):
    print "Object stored"
    reactor.stop()

# Store returns a deferred, it will create the bucket if needed then store the object
object.store().addCallback(stored)

reactor.run()
Something went wrong with that request. Please try again.