Find on key in dict
Easy peasy way to find a dict in a list of dicts based on a key
def find_in_dicts(target: str, key: str, dicts: List[dict]):
try:
return next(item for item in dicts if item[key] == target)
except StopIteration:
return None