git clone git://github.com/basho/riak_pb.git
(cd riak_pb && git checkout --track end-to-end/timeseries)
git clone git://github.com/basho/riak-python-client.git
(cd riak-python-client && git checkout --track end-to-end/timeseries)
Build Riak PB messages for Python. This requires the protoc
command to be in your PATH
. Your distro may have a protoc
or protobuf
package, or you can build from source easily (installs to /usr/local/bin/protoc
):
git clone git://github.com/google/protobuf.git
cd protobuf
git checkout v2.6.1
./autogen.sh
./configure
make && sudo make install
Then:
pip install protobuf
pip install six
cd riak_pb
make python_compile
The following is only if you want to run the Python test suite
Assuming your single-node Riak TS devrel build is in $HOME/riak_ts
, and that Riak is not running:
cd riak-python-client
export RIAK_DIR=$HOME/riak_ts/dev/dev1
make -C buildbot preconfigure
$RIAK_DIR/bin/riak start
make -C buildbot configure
python setup.py setup_timeseries --riak-admin=$RIAK_DIR/bin/riak-admin
To use interactive Python (from the top level of the riak-python-client
clone):
$ PYTHONPATH="$HOME/Projects/basho/riak_pb/python/lib:." python
Python 2.7.10 (default, Oct 20 2015, 09:25:16)
[GCC 5.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from riak import RiakClient
>>>