msl.io.metadata module

Provides information about other data.

class msl.io.metadata.Metadata(read_only, vertex_name, **kwargs)[source]

Bases: Dictionary

Provides information about other data.

Do not instantiate directly. A Metadata object is created automatically when create_dataset() or create_group() is called.

Parameters:
  • read_only (bool) – Whether Metadata is to be accessed in read-only mode.

  • vertex_name (str) – The name of the Vertex that Metadata is associated with.

  • **kwargs – Key-value pairs that will be used to create the Dictionary.

copy(read_only=None)[source]

Create a copy of the Metadata.

Parameters:

read_only (bool, optional) – Whether the copy should be created in read-only mode. If None then creates a copy using the mode for the Metadata that is being copied.

Returns:

Metadata – A copy of the Metadata.

fromkeys(seq, value=None, read_only=None)[source]

Create a new Metadata object with keys from seq and values set to value.

Parameters:
  • seq – Any iterable object that contains the names of the keys.

  • value (object, optional) – The default value to use for each key.

  • read_only (bool, optional) – Whether the returned object should be created in read-only mode. If None then uses the mode for the Metadata that is used to call this method.

Returns:

Metadata – A new Metadata object.