def rows_to_dicts(cur, rows):
    """
    Converts cursor result to a list of dicts rather than list of tuples.
    Args:
        cur: sqlite3 database cursor object
        rows (list<tuple>): output of cursor fetch
    Returns:
        List of dicts where each key is a column name
    """
    cols = [col[0] for col in cur.description]
    return [ dict(zip(cols, vals)) for vals in rows ]