vendor_connectors.meshy.persistence.utils
Utilities for spec hashing and canonicalization.
Module Contents
Section titled “Module Contents”Functions
Section titled “Functions”canonicalize_spec | Convert asset spec to canonical JSON string for hashing. |
|---|---|
compute_spec_hash | Compute truncated SHA256 hash of asset spec. |
vendor_connectors.meshy.persistence.utils.canonicalize_spec(spec: dict[str, Any]) → str
Section titled “vendor_connectors.meshy.persistence.utils.canonicalize_spec(spec: dict[str, Any]) → str”Convert asset spec to canonical JSON string for hashing.
Args: spec: Asset specification dict
Returns: Canonical JSON string (sorted keys, no whitespace)
vendor_connectors.meshy.persistence.utils.compute_spec_hash(spec: dict[str, Any], length: int = 12) → str
Section titled “vendor_connectors.meshy.persistence.utils.compute_spec_hash(spec: dict[str, Any], length: int = 12) → str”Compute truncated SHA256 hash of asset spec.
Args: spec: Asset specification dict length: Hash length (default 12 chars)
Returns: Truncated hex hash safe for filenames