describe_str

hugr.cli.describe_str(hugr_bytes: bytes, *, packaged_extensions: bool = False, no_resolved_extensions: bool = False, public_symbols: bool = False, generator_claimed_extensions: bool = False, no_std: bool = False, extensions: list[str] | None = None, _json: bool = False) str[source]

Describe the contents of a HUGR package as text.

If an error occurs during loading, partial descriptions are printed. For example, if the first module is loaded and the second fails, then only the first module will be described.

Parameters:
  • hugr_bytes – The HUGR package as bytes.

  • packaged_extensions – Enumerate packaged extensions (default: False).

  • no_resolved_extensions – Don’t display resolved extensions used by the module (default: False).

  • public_symbols – Display public symbols in the module (default: False).

  • generator_claimed_extensions – Display claimed extensions set by generator in module metadata (default: False).

  • no_std – Don’t use standard extensions when validating hugrs. Prelude is still used (default: False).

  • extensions – Paths to additional serialised extensions needed to load the HUGR.

Returns:

Text description of the package.