ospx.utils.dict

Functions

find_key(dict_in, pattern)

Find the first key in dict that matches the given pattern.

find_keys(dict_in, pattern)

Find all keys in dict that match the given pattern.

find_type_identifier_in_keys(dict_in)

Find the first type identifier in dict.

shrink_dict(dict_in[, unique_key])

Identify doubled entries in the passed in dict and return a new dict with doubled entries removed.

ospx.utils.dict.find_key(dict_in: MutableMapping[Any, Any], pattern: str) str | None

Find the first key in dict that matches the given pattern.

ospx.utils.dict.find_keys(dict_in: MutableMapping[Any, Any], pattern: str) list[str] | None

Find all keys in dict that match the given pattern.

ospx.utils.dict.find_type_identifier_in_keys(dict_in: MutableMapping[Any, Any]) str | None

Find the first type identifier in dict.

Find. the first key name in dict that contains one of the following type identifier strings: [Integer|Real|Boolean|Enumeration|String|Unknown].

ospx.utils.dict.shrink_dict(dict_in: MutableMapping[Any, Any], unique_key: list[str] | None = None) dict[Any, Any]

Identify doubled entries in the passed in dict and return a new dict with doubled entries removed.