Metadata is a key-value (string-string) store attached to a device.

Support for metadata is the metadata property of SMOKDevice.

It contains an instance of the following:

class smok.metadata.PlainMetadata(device: SMOKDevice)

An object representing device’s plain metadata.

Entries will be cached for 60 seconds after downloading them from the server.

Note that this does not support iteration or getting length, but supports __setitem__, __delitem__ and __getitem__.

get(key: str, default=None) str

Get a value for given metadata, returning default if it KeyErrors

It supports __getitem__, __setitem__ and __delitem__. It does not support __len__ and __iter__.


Right now the SMOK API only allows access to plain metadata.