cur.execute('select * from Updates')
column_names = [d[0] for d in cur.description]
for row in cur:
    info = dict(zip(column_names, row))
How to read data out of a SQLite database, into a dictionary before encoding it in JSON?