python document storing?

Dan Reverri dan at basho.com
Fri Jul 30 03:30:22 EDT 2010


Hi Bob,

Sorry for not getting back to you sooner. To store binary data with the riak
python client use the bucket.new_binary method. There are no functions that
operate directly on files so you will have to read the file and pass the
contents of the file as the data of the riak object. Here is an example of
how one could read a file and store the data in Riak:
http://gist.github.com/500082

Thanks,
Dan

Daniel Reverri
Developer Advocate
Basho Technologies, Inc.
dan at basho.com


On Wed, Jul 7, 2010 at 11:55 AM, robert schaefer <rps at haystack.mit.edu>wrote:

> Hello all,
> New question...
>
>  I would like to store and retrieve binary and/or text documents using the
> riak python client.
>  Would I open the file and load it to a myarray variable and then
> bucket.new("my_key":myarray)?
>  Or is there something in the riak-python-client that can directly operate
> on files, like bucket.new("my_key":"myfile.txt")?
>
> bob schaefer
>
>
> -----------------------------------
> robert schaefer
> Atmospheric Sciences Group
> MIT Haystack Observatory
> Westford, MA 01886
>
> email:  rps at haystack.mit.edu
> voice:  781-981-5767
> www:  http://www.haystack.mit.edu
>
>
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20100730/079e59b5/attachment.html>


More information about the riak-users mailing list