Global data object

The global data object is an object where you can store arbitrary data types to be reached across different tasks. The object is a property on context, context.g, which can be imported from caliber: from caliber import context.


class caliber.glob.Globals[source]

A plain namespace object for holding data as arbitrary attributes.

get(name: str, default: Any | None = None) Any[source]

Get attribute by name.

pop(name: str, default: Any | None = None) Any[source]

Get and remove attribute by name.

setdefault(name: str, default: Any | None = None) Any[source]

Get value of attribute if present, set and return default if not.

clear() None[source]

Clear all attributes.