@staticmethod
def dict_factory(cursor, row):
    """Convert SQL result into a dictionary"""
    dictionary = {}
    for idx, col in enumerate(cursor.description):
        dictionary[col[0]] = row[idx]
    return dictionary
