errbot.storage.base module¶
- class errbot.storage.base.StorageBase[source]¶
Bases:
objectContract to implemement a storage.
- abstract close() None[source]¶
Sync and close the storage. The caller of close will protect against close on non open and double close.
- abstract get(key: str) Any[source]¶
Get the value stored for key. Raises KeyError if the key doesn’t exist. The caller of get will protect against get on non open.
- Return type:
Any- Parameters:
key (
str) – the key- Returns:
the value
- class errbot.storage.base.StoragePluginBase(bot_config)[source]¶
Bases:
objectBase to implement a storage plugin. This is a factory for the namespaces.
- abstract open(namespace: str) StorageBase[source]¶
Open the storage with the given namespace (core, or plugin name) and config. The caller of open will protect against double opens.
- Return type:
- Parameters:
namespace (
str) – a namespace to isolate the plugin storages.- Returns:
Previous: errbot.storage package
|
Next: errbot.storage.memory module