MemoryArtifactStore#

class scikitplot.agent.MemoryArtifactStore[source]#

Keep artifacts in memory, as their canonical JSON text.

Examples

>>> store = MemoryArtifactStore()
>>> key = store.put({"rows": [1, 2, 3]})
>>> store.get(key)
{'rows': [1, 2, 3]}
get(key)[source]#

Return the value stored under key.

Raises:
KeyError

If nothing is stored under key.

StateError

If what is stored does not have digest key.

Parameters:

key (str)

Return type:

Any

has(key)[source]#

Whether a value is stored under key.

Parameters:

key (str)

Return type:

bool

put(value)[source]#

Store value and return its digest.

Parameters:
valueobject

A JSON value (plain).

Returns:
str

64 hexadecimal digits.

Parameters:

value (Any)

Return type:

str