The Riak client for Python.

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

Python Client for Riak

Build Status

Build Status

Documentation

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.

Installation

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 setup.py 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

Testing

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.

Source

To setup the default test configuration, build a Riak node from a clone of github.com/basho/riak:

```sh

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.

Package

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

Contributors

  • 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

Issues

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 = '10.32.101.72' set_pb_port = 8087 set_nodes = [{'host':'10.32.101.72', '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

print(myclient.get_buckets())

create bucket

mybucket = myclient.bucket('new_bucket')

Get list key in bucket

print(myclient.get_keys(mybucket))

insert data to new bucket

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

print(mybucket.get_keys())

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

```

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/transport.py and observe defintion, however expect to see definition.
  • Examine docsrc/datatypes.rst and observe accoring, however expect to see according.

Notes

Semi-automated issue generated by https://github.com/timgates42/meticulous/blob/master/docs/NOTE.md

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.

https://github.com/timgates42/riak-python-client/pull/new/bugfix_typos

Thanks.

python 3.9 - collections module is not compatible with riak

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

in riak/codecs/init.py ```

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

Update setup.py

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

Releases

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

riak-python-client 2.7.0 https://github.com/basho/riak-python-client/blob/master/RELNOTES.md

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

riak-python-client 2.6.1 https://github.com/basho/riak-python-client/blob/master/RELNOTES.md

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

riak-python-client 2.5.5 https://github.com/basho/riak-python-client/blob/master/RELNOTES.md

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

riak-python-client 2.5.3 https://github.com/basho/riak-python-client/blob/master/RELNOTES.md

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

riak-python-client 2.5.2 https://github.com/basho/riak-python-client/blob/master/RELNOTES.md

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

riak-python-client 2.5.1 https://github.com/basho/riak-python-client/blob/master/RELNOTES.md

Basho Technologies
GitHub Repository