python - pymysql fetchall() results as dictionary? -


is there way results fetchall() dictionary using pymysql?

pymysql includes dictcursor. think want. here's how use it:

import pymysql connection = pymysql.connect(db="test") cursor = connection.cursor(pymysql.cursors.dictcursor) cursor.execute("select ...") 

https://github.com/pymysql/pymysql/blob/master/pymysql/tests/test_dictcursor.py


Comments

Popular posts from this blog

delphi - TJvHidDeviceController "DevicePath" always showing "\" -

Disabling Android home button for industry application -

asp.net mvc 3 - Unexpected "foreach" keyword after "@" character -