demessaging.utils module

Utilities for the demessaging module.

Functions:

append_parameter_docs(model)

Append the parameters section to the docstring of a model.

build_parameter_docs(model)

Build the docstring for the parameters of a model.

merge_config(base, to_merge)

Merge two configuration dictionaries.

object_to_string(obj)

type_to_string(type_)

demessaging.utils.append_parameter_docs(model: Type[BaseModel]) Type[BaseModel][source]

Append the parameters section to the docstring of a model.

demessaging.utils.build_parameter_docs(model: Type[BaseModel]) str[source]

Build the docstring for the parameters of a model.

demessaging.utils.merge_config(base: Dict, to_merge: Dict) Dict[source]

Merge two configuration dictionaries.

Parameters:
  • base (Dict) – The base dictionary that to_merge shall be merged into.

  • to_merge (Dict) – The dictionary to merge.

Returns:

base merged with to_merge

Return type:

Dict

Notes

base is modified in-place!

demessaging.utils.object_to_string(obj: Any)[source]
demessaging.utils.type_to_string(type_: Any)[source]