pyterrastore is a python client library for Terrastore. Terrastore is a modern document store which provides advanced scalability and elasticity features without sacrificing consistency.

The python client API allows terrastore to be accessed using two classes viz. pyterrastore.terrastore.TerrastoreServer and pyterrastore.terrastore.TerrastoreBucket.

The current version has been tested with Terrastore 0.8.1. I (the author) can be reached at dhananjay .d.o.t. nene .a.t. gmail .d.o.t. com


class pyterrastore.terrastore.TerrastoreServer(urls)

A Terrastore server. Note the server does not refer to a single host. It could refer to a single cluster, collectively identified by a sequence of URLs

Creates a new bucket object with the given bucket_name. No corresponding bucket on the server is created
Get a sequence of all bucket names
Get a sequence of bucket objects in the server
Remove an existing bucket


class pyterrastore.terrastore.TerrastoreBucket(server, name)

A bucket is a collection of multiple json objects each uniquely identified by its key. The bucket itself also has a unique name within the server

get(key, default=None)
Fetch a document in the bucket with the given key
Get all the contents in a bucket in a native json format
get_document(key, object_hook=None, default=None)
Get a particular document (ie. json converted into python object) for the given key
Get all the documents in a bucket. This method converts the json into a python object
put(key, content)
Insert a new or update an existing document json string in the bucket for the given key
put_document(key, content)
Insert a new or update an existing document in the bucket for the given key
Remove a document in the bucket with the given key

Table Of Contents

This Page