kd.kontext.flatten_with_path

kd.kontext.flatten_with_path#

kauldron.kontext.flatten_with_path(
pytree: kauldron.kontext.paths._T | collections.abc.Sequence[PyTree[_T]] | collections.abc.Mapping[str, PyTree[_T]] | Any,
*,
prefix: str = '',
separator: str | None = None,
is_leaf: Callable[[Any], bool] | None = None,
) dict[str, kauldron.kontext.paths._T][source]

Flatten any PyTree / ConfigDict into a dict with ‘keys.like[0].this’.