kvp_convert#

compliance_checker.util.kvp_convert(input_coll)[source]#

Converts a list of string attributes and/or tuples into an OrderedDict. If passed in an OrderedDict, function is idempotent. Key/value pairs map to first_tuple_element -> second_tuple_element if a tuple, or scalar_value -> None if not a tuple.

Parameters:

input_coll – An iterable with string and/or 2-tuple elements

Returns:

collections.OrderedDict