The Riak client for Python.

basho, updated 🕥 2022-04-22 06:22:53

Python Client for Riak

Build Status

Build Status


Documentation for the Riak Python Client Library is available here.

Documentation for Riak is available here.

Repository Cloning

NOTE: please clone this repository using the --recursive argument to git clone or follow the clone with git submodule update --init. This repository uses two submodules.


The recommended versions of Python for use with this client are Python 2.7.8 (or greater, 2.7.11 as of 2016-06-21), 3.3.x, 3.4.x and 3.5.x. The latest version from each series should be preferred. Older versions of the Python 2.7.X and 3.X series should be used with caution as they are not covered by integration tests.

Riak TS (Timeseries)

You must use version 2.7.11, 3.4.4 or 3.5.1 (or greater within a version series). Otherwise you will be affected by this Python bug.

From Source

sh python install

There are additional dependencies on Python packages setuptools and protobuf.

From PyPI

Official packages are signed and published to PyPI.

To install from PyPI directly you can use pip.

sh pip install riak


Unit Tests

Unit tests will be executed via tox if it is in your PATH, otherwise by the python2 and (if available), python3 executables:

sh make unit-test

Integration Tests

You have two options to run Riak locally - either build from source, or use a pre-installed Riak package.


To setup the default test configuration, build a Riak node from a clone of


check out latest release tag

git checkout riak-2.1.4 make locked-deps make rel ```

Source build documentation.

When building from source, the protocol buffers port will be 8087 and HTTP will be 8098.


Install using your platform's package manager (docs)

When installing from a package, the protocol buffers port will be 8087 and HTTP will be 8098.

Running Integration Tests

  • Ensure you've initialized this repo's submodules:

sh git submodule update --init

  • Run the following:

sh ./tools/setup-riak make integration-test


  • Andrew Thompson
  • Andy Gross
  • Armon Dadgar
  • Brett Hazen
  • Brett Hoerner
  • Brian Roach
  • Bryan Fink
  • Daniel Lindsley
  • Daniel Néri
  • Daniel Reverri
  • Dan Root
  • David Basden
  • David Delassus
  • David Koblas
  • Dmitry Rozhkov
  • Eric Florenzano
  • Eric Moritz
  • Filip de Waard
  • Gilles Devaux
  • Greg Nelson
  • Gregory Burd
  • Greg Stein
  • Ian Plosker
  • Jayson Baird
  • Jeffrey Massung
  • Jon Meredith
  • Josip Lisec
  • Justin Sheehy
  • Kevin Smith
  • Luke Bakken
  • Mark Erdmann
  • Mark Phillips
  • Mathias Meyer
  • Matt Heitzenroder
  • Matt Lohier
  • Mikhail Sobolev
  • Reid Draper
  • Russell Brown
  • Rusty Klophaus
  • Rusty Klophaus
  • Scott Lystig Fritchie
  • Sean Cribbs
  • Shuhao Wu
  • Silas Sewell
  • Socrates Lee
  • Soren Hansen
  • Sreejith Kesavan
  • Timothée Peignier
  • tobixx
  • Tin Tvrtković
  • Vitaly Shestovskiy
  • William Kral
  • Yasser Souri


How create bucket for riak-cs?

opened on 2022-10-03 10:47:28 by Konstantin74R

I'm use riak-python-client 2.7.0. for riak kv 2.1.1 and riak-cs 2.1.0. I created bucket using protocol pbc, but s3cmd don't see them. Bucket exists in Riak KV and my script show me them. How can i create s3 bucket using riak python client and pbc protocol?

my source code ```

Connection options

set_protocol = 'pbc' set_host = '' set_pb_port = 8087 set_nodes = [{'host':'', 'pb_port':8087}]

create connection

myclient = riak.RiakClient(protocol = set_protocol, host = set_host, http_port = set_pb_port, nodes = set_nodes)

Get list buckets


create bucket

mybucket = myclient.bucket('new_bucket')

Get list key in bucket


insert data to new bucket

obj = riak.RiakObject(myclient, mybucket, 'test_key' ) = 'asdfasdfasdf'


fetched1 = mybucket.get('test_key') print('


Protobuf issue

opened on 2022-01-21 14:26:16 by mdasadul

Converting string to binary

Proposing a PR to fix a few small typos

opened on 2021-06-27 21:28:50 by timgates42

Issue Type

[x] Bug (Typo)

Steps to Replicate and Expected Behaviour

  • Examine riak/transports/http/ and observe defintion, however expect to see definition.
  • Examine docsrc/datatypes.rst and observe accoring, however expect to see according.


Semi-automated issue generated by

To avoid wasting CI processing resources a branch with the fix has been prepared but a pull request has not yet been created. A pull request fixing the issue can be prepared from the link below, feel free to create it or request @timgates42 create the PR. Alternatively if the fix is undesired please close the issue with a small comment about the reasoning.


python 3.9 - collections module is not compatible with riak

opened on 2021-04-16 07:12:51 by agniszczotka

in riak/codecs/ ```

from riak.codecs import Codec Msg = collections.namedtuple('Msg', ['msg_code', 'data', 'resp_code'], verbose=False) ``` TypeError: namedtuple() got an unexpected keyword argument 'verbose'

updated riak python client for python3

opened on 2020-12-01 22:46:07 by jagguli None


opened on 2020-10-26 14:48:43 by SheikhUmaid None


Riak Python Client 2.7.0 2016-12-12 22:51:14

riak-python-client 2.7.0

Riak Python Client 2.6.1 2016-11-17 20:51:37

riak-python-client 2.6.1

Riak Python Client 2.5.5 2016-07-18 22:21:20

riak-python-client 2.5.5

Riak Python Client 2.5.3 2016-05-31 22:37:03

riak-python-client 2.5.3

Riak Python Client 2.5.2 2016-05-05 23:28:14

riak-python-client 2.5.2

Riak Python Client 2.5.1 2016-05-03 04:03:15

riak-python-client 2.5.1

Basho Technologies
GitHub Repository