atpthings.dict.list_to_dict#
- atpthings.dict.list_to_dict(list_of_dict: list, key: str, value: Optional[str] = None) dict #
Convert list of dictionaries to dictionary by key.
- Parameters:
- list_of_dictlist
List of dictionaries.
- keystr
Key which value will be used for primary key of dict.
- valuestr, optional (default whole dictionary)
The key in dictionary to be copied as a vlue.
- Returns:
- dict
Dictionary created from list of dictionaries.