Package

class hugr.model.Package(modules: Sequence[Module])[source]

Bases: object

A sequence of hugr modules.

Methods

from_bytes

Read a package from its binary representation.

from_str

Read a package from its string representation.

Attributes

version

Returns the model version used to encode this package.

modules

static from_bytes(b: bytes) Package[source]

Read a package from its binary representation.

static from_str(s: str) Package[source]

Read a package from its string representation.

property version: Version

Returns the model version used to encode this package.