First, can you do all this in Python or PHP? Using multiple languages ββis usually considered an anti-pattern. This does not mean that it is always a bad idea, but you should question why first, and only if you are convinced that a good idea will move forward.
As for the features of what you want to do, there are several options:
If you use Apache, you can use the function virtual()to issue a new request through Apache.
It is assumed that you are using mod_php and mod_wsgi. Basically, you will create a query string for the variables you want to pass, and name it like this:
virtual('path/to/python.py?'.$query);
Create your own PHP WSGI gateway.
Basque, specify the WSGI specification in the library and call it explicitly from PHP.
exec() (, , ).
, , , . , . ...