HugrGenerator

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

Bases: Metadata[GeneratorDesc]

Metadata describing the generator that defined the HUGR module.

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: JsonType) GeneratorDesc[source]

Deserialize the metadata value from the stored json value.

classmethod to_json(value: GeneratorDesc) dict[str, str][source]

Serialize the metadata value to a json value.