I assume python is install on the flight computer. In this case there are several simplier options:
1. Call python script with FM_ShellCommand. This can be used to delegate functionality to another shell process, python included. It has limitations (command sizes, shell constraints) but would be quick.
2. Create a python wrapper component that has the C++ interface to F´ as a component, but delegates to calls to python using `os.system` to create the python process.
Your process would work to, but comes with a lot of other requirements: a socket to write between C++ and python, a flask server, API design, ect. Since I assume the FSW (C++) and python are on the same system, you can investigate other more tradition methods for calling python from C++.
-Michael