Are Python-based web frameworks reliable enough?

Krishnakant hackingkk at
Mon May 25 21:41:38 CEST 2009

On Mon, 2009-05-25 at 20:49 +0200, Gilles Ganault wrote:
> Hello
> 	Until now, the modest web apps I wrote were all in PHP because it's
> available on just about any hosted server.
> I now have a couple of ideas for applications where I would deploy my
> own servers, so that I'd rather write them in Python because I find
> the language more pleasant to write with.
> Certainly, You will be much much more productive if you use python provided you are not going to do it the old "cgi " way.

> I read that the traction for the mod_python module isn't as strong as
> mod_php, so I guess I should consider the alternative, which is
> writing a long-running process with some framework like TurboGears or
> Django.
Why not give a try to pylons?  While turbogears is great and very
powerful, it any ways uses most of pylons and pylons is not just rock
solid and robust, it also has very very good documentation.
Not to mention the fact that heavy production applications are today
running pylons.

> To make an informed choice, I'd like your feedback on this:
> 1. Is mod_python a bad choice today? If yes, are there other PHP-like
> modules available, ie. the Python code is hosted in pages that are
> loaded every time a user calls them?
> Even if it was a good choice, cgi method of programming is no more suitable in today's www, because the requirements of a web developer today are much beyond just oepning a connection to a database and sending some processed response in plain old html.
Today's web applications do much more than that so a web framework is
almost always a better choice.

> 2. If you think I should consider long-running processes, are the
> frameworks reliable enough so that I shouldn't fear crashes every so
> often?
No not really, although it is always a better idea to run your
production web app behind apache.  This will keep the server up on very
heavy loads and you will not have to worry about http requests and
responses.  let that be taken care by the best tool (apache ) and let
your application handle how to manage the logic and send out views.

> 3. What about performance as compared to equivalent PHP/MySQL apps?
Performance is very good if you use the right tool in the right place.
This is the biggest advantage of some web frameworks like pylons or tg
over other.
happy hacking.

More information about the Python-list mailing list