unienv_interface.space.metadata¶
Read-only, JSON-serializable metadata attached to spaces (see Space.metadata).
SpaceMetadata
¶
SpaceMetadata(data: Optional[Mapping[str, Any]] = None)
Bases: Mapping
Immutable, JSON-serializable str-keyed mapping describing a space.
Created from any mapping of JSON data (validated and deep-copied); nested
mappings are frozen into SpaceMetadata and lists into tuples. Compares
equal to plain mappings with the same content (lists and tuples are
interchangeable). to_dict() returns a plain, mutable JSON copy.
coerce_metadata
¶
coerce_metadata(metadata: Optional[Mapping[str, Any]]) -> SpaceMetadata
metadata as a SpaceMetadata (validated and copied unless it already is one).