Module spin_sdk.key_value

Module for accessing Spin key-value stores

Functions

def open(name: str) ‑> Store

Open the store with the specified name.

If name is "default", the default store is opened. Otherwise, name must refer to a store defined and configured in a runtime configuration file supplied with the application.

A Err(Error_NoSuchStore) will be raised if the name is not recognized.

A Err(Error_AccessDenied) will be raised if the requesting component does not have access to the specified store.

A Err(Error_StoreTableFull) will be raised if too many stores have been opened simultaneously. Closing one or more previously opened stores might address this using the __exit__ method.

A Err(Error_Other(str)) will be raised if some implementation specific error has occured (e.g I/O)

def open_default() ‑> Store

Open the default store.

A Err(Error_AccessDenied) will be raised if the requesting component does not have access to the default store.

A Err(Error_StoreTableFull) will be raised if too many stores have been opened simultaneously. Closing one or more previously opened stores might address this using the __exit__ method.

A Err(Error_Other(str)) will be raised if some implementation specific error has occured (e.g I/O)