Python DB API returns a list of tuples when fetchall is invoked on an executed cursor. If you work with the _mysql module, fetch_row has a how
parameter that allows to get a dictionary instead of a tuple. How can I achieve the same with the cursor ?
Asked
Active
Viewed 1,099 times
5

Stefano Borini
- 138,652
- 96
- 297
- 431
1 Answers
4
Quoting from the documentation
DictCursor
Like Cursor except it returns rows as dictionaries.

Andrew Dalke
- 14,889
- 4
- 39
- 54
-
Blindness is my friend, but google didn't help. Now it will. Thanks. – Stefano Borini Jan 16 '11 at 17:21