fsl.utils.meta

This module provides the Meta class.

class fsl.utils.meta.Meta[source]

Bases: object

The Meta class is intended to be used as a mixin for other classes. It is simply a wrapper for a dictionary of key-value pairs.

It has a handful of methods allowing you to add and access additional metadata associated with an object.

metaKeys Returns the keys contained in the metadata dictionary (dict.keys).
metaValues Returns the values contained in the metadata dictionary (dict.values).
metaItems Returns the items contained in the metadata dictionary (dict.items).
getMeta Returns the metadata value with the specified key (dict.get).
setMeta Add some metadata with the specified key (dict.__setitem__).
updateMeta Update the metadata dict (dict.update).
static __new__(cls, *args, **kwargs)[source]

Initialises a Meta instance.

metaKeys()[source]

Returns the keys contained in the metadata dictionary (dict.keys).

metaValues()[source]

Returns the values contained in the metadata dictionary (dict.values).

metaItems()[source]

Returns the items contained in the metadata dictionary (dict.items).

getMeta(*args, **kwargs)[source]

Returns the metadata value with the specified key (dict.get).

setMeta(*args, **kwargs)[source]

Add some metadata with the specified key (dict.__setitem__).

updateMeta(*args, **kwargs)[source]

Update the metadata dict (dict.update).

__dict__ = mappingproxy({'__module__': 'fsl.utils.meta', '__doc__': 'The ``Meta`` class is intended to be used as a mixin for other classes. It\n is simply a wrapper for a dictionary of key-value pairs.\n\n It has a handful of methods allowing you to add and access additional\n metadata associated with an object.\n\n .. autosummary::\n :nosignatures:\n\n metaKeys\n metaValues\n metaItems\n getMeta\n setMeta\n updateMeta\n ', '__new__': <staticmethod object>, 'metaKeys': <function Meta.metaKeys>, 'metaValues': <function Meta.metaValues>, 'metaItems': <function Meta.metaItems>, 'getMeta': <function Meta.getMeta>, 'setMeta': <function Meta.setMeta>, 'updateMeta': <function Meta.updateMeta>, '__dict__': <attribute '__dict__' of 'Meta' objects>, '__weakref__': <attribute '__weakref__' of 'Meta' objects>})
__module__ = 'fsl.utils.meta'
__weakref__

list of weak references to the object (if defined)