The kubragen2.util module

kubragen2.util.dict_flatten(d, parent_key='', sep='.') → Mapping

Flatten a dict to a single level.

kubragen2.util.dict_get_value(dict: Mapping, name: str) → Any

Gets data from a dictionary using a dotted accessor-string

Parameters
  • dict – source dictionary

  • name – dotted value name

kubragen2.util.dict_has_name(dict: Mapping, name: str) → bool

Checks if the dict has a name using a dotted accessor-string

Parameters
  • dict – source dictionary

  • name – dotted value name

kubragen2.util.urljoin(*args: str) → str

Join an array of strings using a forward-slash representing an url.

Parameters

args – list of strings to join

Returns

joined strings