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

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -