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.


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.


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

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

Following the same pattern found in

Parameters:kv_uri – URI to the Key-value store for example redis://

Healthcheck query to the backend