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
Post a Comment