def dictfetchall(cursor: connection.cursor) -> List[Dict[(str, Any)]]:
    'Returns all rows from a cursor as a dict'
    desc = cursor.description
    return [dict(zip((col[0] for col in desc), row)) for row in cursor.fetchall()]
Returns all rows from a cursor as a dict
def dictfetchall(cursor: connection.cursor) -> List[Dict[(str, Any)]]:
    
    desc = cursor.description
    return [dict(zip((col[0] for col in desc), row)) for row in cursor.fetchall()]