I capture data using mitmproxy and it is displayed in the web interface. Here is example from duolingo app. duolingo example I need to get them into the python (as JSON) so that I can continue working with them (do statistical analysis, etc.). The mitmproxy website states: Write powerful addons and script mitmproxy with mitmdump. The scripting API offers full control over mitmproxy and makes it possible to automatically modify messages, redirect traffic, visualize messages, or implement custom commands. But I did not find any documentation to help me. Note: I'm a novice python.
Here is a docu page how to create addon: https://docs.mitmproxy.org/stable/addons-overview/
Examples of different addons: https://docs.mitmproxy.org/stable/addons-examples/