Key-value Store

class moxie.core.kv.KVService(backend_uri)

Service for accessing a Key-Value store. This is the secondary datastore used within Moxie. General usage should be for caching and as a non-critical data store.

Most development has taken place with redis being used as the KV store. Currently this is the only fully supported KV store, see: moxie.core.kv.SUPPORTED_KV_STORES for details.

__getattr__(name)

The KV Service proxies all calls through to the underlying backend. Since we only have one moxie.core.kv.SUPPORTED_KV_STORES for the time being it doesn’t make sense to restrict the functionality.

Note

In future we may need to consider this API if we want to have other supported backends. This might involve implementing a compatibility layer.

__init__(backend_uri)
__module__ = 'moxie.core.kv'
static _get_backend(kv_uri)

Following the same pattern found in moxie.core.search.SearchService._get_backend()

Parameters:kv_uri – URI to the Key-value store for example redis://foo.bar/bucket.
healthcheck()

Healthcheck query to the backend