Python web frameworks

Paul Boddie paul at
Tue Nov 20 16:13:52 CET 2007

On 20 Nov, 15:42, "Diez B. Roggisch" <de... at> wrote:
> > 12/7. Django comes with its own little server so that you don't have
> > to set up Apache on your desktop to play with it.
> I was rather shocked to learn that django only has this tiny server and does
> not come with a stand-alone server and is supposed to run as
> mod_python/cgi-driven app through apache.

The standalone server aspect of a large number of Python Web
frameworks typically involves BaseHTTPServer from the standard
library, as far as I've seen, excluding things like Twisted which
aspire to offer production quality server solutions themselves. This
was common back in the old days of Webware, in contrast to Zope which
used Medusa at the time, if I remember correctly.

> Which reaps you of all the benefits of standalone servers like connection
> pooling & caching data and so forth. Including sessions - I presume they
> always go into the db/filesystem as PHP does.

I guess it's a compromise between deployment complexity and benefits
in the above areas, although mod_python should offer some relief in
some of the above areas. What people didn't like about Webware so much
was that run in the recommended way - with a standalone server which
communicated with Web server processes - people had to have separate
long-running processes, which various hosting providers didn't like.

What's most important is that you should be able to switch out one
server technology with another when you reach the limits of the
original, all without having to rewrite your application or do some
major re-plumbing. It does surprise me that mod_python is recommended
for use with Django in the various quick start guides I've read, but I
suppose that lets the developer avoid the issue of migrating up from a
simple server to something more scalable. Not that this should be a
problem, of course.


More information about the Python-list mailing list