Earlier quoted context omitted.
There is pretty-print [0], which you could dump inside pre tags, or print to stdout. But honestly, depending on the framework, quicker options exist than (basically) printf debugging. [0] https://docs.python.org/3/library/pprint.html#example
For Flask what would be the better option?
(occasionally, the low effort of print-debugging works, but if you keep having to print in more/different locations... it's a blunt tool IMO)