HugrUsedExtensions

class hugr.metadata.HugrUsedExtensions(*args, **kwargs)[source]

Bases: Metadata[list[ExtensionDesc]]

Metadata storing the list of extensions required to define the HUGR.

This list may contain additional extensions that are no longer present in the Hugr.

This value is only valid when set at the module root node.

Methods

from_json

Deserialize the metadata value from the stored json value.

to_json

Serialize the metadata value to a json value.

Attributes

KEY

classmethod from_json(value: str | int | float | bool | None | Mapping[str, JsonType] | list[JsonType]) list[ExtensionDesc][source]

Deserialize the metadata value from the stored json value.

classmethod to_json(value: list[ExtensionDesc]) str | int | float | bool | None | Mapping[str, JsonType] | list[JsonType][source]

Serialize the metadata value to a json value.