I want to have the result of my query converted to a list of dicts like this :
result_dict = [{\'category\': \'failure\', \'week\': \'1209\', \'stat\': \'tdc_ok
This works now
result_dict = [u._asdict() for u in my_query.all()]
The reason is that u is not actually a tuple but a KeyedTuple.
The correct answer on this thread also would be helpful