Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```python
- def make_dicts_from_result_proxy(proxy):
- res = proxy.fetchall()
- if res:
- keys = res[0].keys()
- res = [dict(zip(keys, i.values())) for i in res]
- return res
- make_dicts_from_result_proxy(engine.execute("SELECT * FROM example"))
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement