I'm developing a small sector of the PHP application with a few python code. The python code runs as an same as a servlet (listens and responds to HTTP on port 8765) on localhost. The PHP application calls it like:


The pyth-let is written using the BaseHTTPServer module like:

class MyHandler(BaseHTTPRequestHandler):

   def do_GET(self):

      if self.path=="/search":


         # ....


It creates my workstation and my colleague's. I would now like to deploy it inside a production atmosphere, with modifications. The concept in your mind is the fact that I ought to:

  1. modify my application to FCGI
  2. have an affordable VPS account
  3. set Apache to make use of FCGI to spawn and alive both PHP application and also the pyth-let.

Therefore it is a localhost application, which shouldnt be uncovered publically. There must be reliable method to ensure that it stays alive. We expect ~800 hits each day before requiring upgrading, so merely a single instance necessary stored alive.

It is possible to achievable method of doing this on the popular shared host, as opposed to a VPS? Am I on course with my above-pointed out plan?

Postscipts I pointed out "easy, reliable, cheap way" by "way" I meant both development direction in addition to a good (cheap) hosting plan that may support it.

You should use flup for everyone your python application with fastcgi. I have also used gunicorn to deploy python webapps together with supervisor and located that to become a good approach - as well as simpler to create.