Here is how I would do it:
A prerequisite for below would be to have a batch file in windows that would kick off your python test, for example I created a batch file with the following contents to run my selenium test:
cd..
cd..
cd C:PSelenium
python test.py
Once you have this, the easiest way to run it in ALM would be to create a Vapi-XP script in ALM, I was able to create one and selected VBScript as the script language for the Vapi-XP test, then you can then click ''Finish''
Once you have created the Vapi-XP test you would then go to the ''Test Script'' section of the test and find the section that says ' TODO: put your code here you would replace that with your own code that would kick off your python test. In my environment I created the batch file above that would run my python/selenium script then I put the following code in the Vapi-XP script to run the batch file:
mycommand = ''C:PSeleniumRunVapi.bat''
TDOutput.Print ''Starting '' & mycommand
result=run(mycommand,0,true)
TDOutput.Print ''Test ended with '' & result
This command runs the batch file that I created at the beginning which in turn runs the selenium/python script. There is only one downside to this, as long as the batch file is able to run it will report a pass even if the selenium script did not run properly or encountered an error, it would be up to you to add further logic that would have checkpoints, etc, you could even update the results to the test using the OTA api or Rest API.