SHOW COLUMNS or Get Column Names From SQLalchemy SELECT Query
http://stackoverflow.com/questions/8947616/python-sqlalchemy-get-column-names-dynamically
Rob Wouter’s answer really helped me out:
You can either find the columns by calling
result.keys()or you can access them through callingv.keys()inside the for loop. Here’s an example usingitems():for v in result: for column, value in v.items(): print('{0}: {1}'.format(column, value))