_MetadataMixin

class _MetadataMixin(metadata: dict[str, Any] | None = None)

Methods

clear_metadata

Remove all properties.

property

Returns the value of a metadata property or None if it does not exist.

property_exists

Check if a given property is set.

set_property

Sets the value of a metadata property.

Attributes

metadata

Returns the collection's metadata.

Parameters:

metadata (dict[str, Any] | None)

Methods

_MetadataMixin.clear_metadata() None

Remove all properties.

Return type:

None

_MetadataMixin.property(prop: str) Any | None

Returns the value of a metadata property or None if it does not exist.

Parameters:

prop (str) -- the property to read

Return type:

Any | None

_MetadataMixin.property_exists(prop: str) bool

Check if a given property is set.

Parameters:

prop (str) -- the property whose existence to check

Return type:

bool

_MetadataMixin.set_property(prop: str, value: Any | None) None

Sets the value of a metadata property. For system properties, this function casts the value to the proper type and throw an exception if this fails. If the value is None, the property is removed.

Parameters:
  • prop (str) -- property to set

  • value (Any | None) -- value to assign

Return type:

None

Attributes

_MetadataMixin.metadata

Returns the collection’s metadata.

Returns:

metadata