EnvelopeFormat

class hugr.envelope.EnvelopeFormat(*values)[source]

Bases: Enum

Format used to encode a HUGR envelope.

Methods

ascii_printable

Attributes

MODEL

A capnp-encoded hugr-model.

MODEL_WITH_EXTS

A capnp-encoded hugr-model, immediately followed by a json-encoded extension registry.

S_EXPRESSION

A textual representation of a hugr.

S_EXPRESSION_WITH_EXTS

A textual representation of a hugr, preceded by a json-encoded extension registry.

JSON

A json-encoded hugr-package.

JSON = 63

A json-encoded hugr-package. This format is ASCII-printable. DEPRECATED.

MODEL = 1

A capnp-encoded hugr-model.

MODEL_WITH_EXTS = 2

A capnp-encoded hugr-model, immediately followed by a json-encoded extension registry.

S_EXPRESSION = 40

A textual representation of a hugr.

S_EXPRESSION_WITH_EXTS = 41

A textual representation of a hugr, preceded by a json-encoded extension registry.