mapping_to_str#

dpeeg.utils.mapping_to_str(mapping: Mapping, kv_symbol: str = '=', symbol: str = ', ') str[source]#

Convert a mapping (e.g., dict) into a string format.

Parameters:
  • mapping (Mapping) – The mapping (e.g., dict) to be converted into a string. It should contain keys and values that can be converted to strings.

  • kv_symbol (str) – The separator to be used between key and value in the resulting string.

  • symbol (str) – The separator to be used between key-value pairs in the resulting string. Defaults to “, “ (a comma followed by a space).