Option 1: Use a Python library such as Django or Flask Option 2: Run Python through by embedding PHP into HTML <?PHP echo shell_exec("python main.py"); ?>