DescriptionObject

class DescriptionObject(d: dict[str, Any] = None)

A base class for all “Description Objects” that need to convert to/from dictionary objects internally.

This because, ultimately, all Description Objects must be serialized to JSON (or YAML) and the easiest way to accomplish this is to pull a dict object hierarchy.

asDictionary() dict[str, Any]

Returns the backing dictionary object as-is.

clear() None

Removes all items from the object.

get(key: str, default: Any = None) Any

Gets the value for the given key.

merge(other: DescriptionObject | dict) Any

Merges the contents of another DescriptionObject (or dictionary) into the current instance.

Parameters:

other (DescriptionObject|dict) – The “other” object to merge.

pop(key: str, default: Any = None) Any | None

Delete the item, returning its value. If the item does not exist default is returned.

set(key: str, value: DescriptionObject | None = None) None

Sets a value for the given key.