monai.deploy.core.datastores.MemoryDatastore

class monai.deploy.core.datastores.MemoryDatastore(**kwargs)[source]

Bases: monai.deploy.core.datastores.datastore.Datastore

Methods

__init__(**kwargs)

delete(key)

Delete value from the data store.

exists(key)

Check if key exists in data store.

get(key[, def_val])

Get value from the data store.

keys()

Get keys from data store.

put(key, value)

Put value into the data store.

size()

Get size of data store.

delete(key)[source]

Delete value from the data store.

Parameters

key (Hashable) – A key to delete.

exists(key)[source]

Check if key exists in data store.

Parameters

key (Hashable) – A key to check.

Returns

True if key exists, False otherwise.

Return type

exists (bool)

get(key, def_val=None)[source]

Get value from the data store.

Parameters

key (Hashable) – A key to get.

Returns

A value from the data store.

Return type

value (Any)

keys()[source]

Get keys from data store.

Returns

A view of keys.

Return type

keys (KeysView)

put(key, value)[source]

Put value into the data store.

Parameters
  • key (Hashable) – A key to put.

  • value (Any) – A value to put.

size()[source]

Get size of data store.

Returns

A size of data store.

Return type

size (int)