ou_container_builder.state

ou_container_builder.state#

Builder state handling.

class ou_container_builder.state.State#

The State represents the state of the builder and provides support for observing changes.

add_listener(prefix: str, callback: Callable[[State, Any], None])#

Add a listener that is notified when the State changes at the location prefix.

update(settings: dict) None#

Update the State with the given settings.

ou_container_builder.state.merge_settings(base: dict, new: dict) dict#

Return a new dictionary created by merging the settings from new into base.

Parameters:
  • base (dict) – The base dictionary to merge into

  • new (dict) – The new dictionary to merge

Returns:

A new merged dictionary

Return type:

dict