ArtifactStore#

class scikitplot.agent.ArtifactStore[source]#

Keeps JSON values under the digest of their canonical form.

Subclasses implement _write and _read; the digest and its check are done here, once.

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