1
2
3
4
5
import sqlite3
c = sqlite3.connect(':memory:')
c.row_factory = sqlite3.Row
for row in c.execute('select 1 as foo, 2 as bar'):
    print dict(row)