connection = sqlite3.connect('~/foo.sqlite')
connection.row_factory = sqlite3.Row
cursor = connection.execute('select * from bar')
row = cursor.fetchone()
names = list(row.keys())
Is there a way to get a list of column names in sqlite?