Is there any way to programatically open the mitmproxy?

For example, like

from mitmproxy import mitmproxy_main

if __name__ == "__main__":
  mitmproxy_main(parameters...)

Is there anyway to do so?

You were almost there. :stuck_out_tongue:

from mitmproxy import main

if __name__ == "__main__":
    main.mitmproxy(args="--no-mouse")