qcodes.metadatable

Classes:

Metadatable([metadata])

MetadatableWithName([metadata])

Add short_name and full_name properties to Metadatable.

class qcodes.metadatable.Metadatable(metadata: Mapping[str, Any] | None = None)[source]

Bases: object

Methods:

load_metadata(metadata)

Load metadata into this classes metadata dictionary.

snapshot([update])

Decorate a snapshot dictionary with metadata.

snapshot_base([update, params_to_skip_update])

Override this with the primary information for a subclass.

load_metadata(metadata: Mapping[str, Any]) None[source]

Load metadata into this classes metadata dictionary.

Parameters:

metadata – Metadata to load.

final snapshot(update: bool | None = False) dict[str, Any][source]

Decorate a snapshot dictionary with metadata. DO NOT override this method if you want metadata in the snapshot instead, override snapshot_base().

Parameters:

update – Passed to snapshot_base.

Returns:

Base snapshot.

snapshot_base(update: bool | None = False, params_to_skip_update: Sequence[str] | None = None) dict[str, Any][source]

Override this with the primary information for a subclass.

class qcodes.metadatable.MetadatableWithName(metadata: Mapping[str, Any] | None = None)[source]

Bases: Metadatable

Add short_name and full_name properties to Metadatable. This is used as a base class for all components in QCoDeS that are members of a station to ensure that they have a name and consistent interface.

Attributes:

short_name

Name excluding name of any parent that this object is bound to.

full_name

Name including name of any parent that this object is bound to separated by '_'.

Methods:

load_metadata(metadata)

Load metadata into this classes metadata dictionary.

snapshot([update])

Decorate a snapshot dictionary with metadata.

snapshot_base([update, params_to_skip_update])

Override this with the primary information for a subclass.

abstract property short_name: str

Name excluding name of any parent that this object is bound to.

abstract property full_name: str

Name including name of any parent that this object is bound to separated by ‘_’.

load_metadata(metadata: Mapping[str, Any]) None

Load metadata into this classes metadata dictionary.

Parameters:

metadata – Metadata to load.

snapshot(update: bool | None = False) dict[str, Any]

Decorate a snapshot dictionary with metadata. DO NOT override this method if you want metadata in the snapshot instead, override snapshot_base().

Parameters:

update – Passed to snapshot_base.

Returns:

Base snapshot.

snapshot_base(update: bool | None = False, params_to_skip_update: Sequence[str] | None = None) dict[str, Any]

Override this with the primary information for a subclass.