def build_query_dict(fields, results):
    # type: (List[str], Sequence[Sequence[Any]]) -> List[Dict[str, Any]]
    '''Builds a list of dictionaries from the results of a query.'''
    return [{field: value for field, value in zip(fields, row)} for row in results]
Builds a list of dictionaries from the results of a query.
frontend/securitybot_api.py