views:

452

answers:

4

From nearlyfreespeech's website, they state that the following don't work well:

  • mod_python Web application
  • frameworks that depend on persistent processes, including: Ruby On Rails, Django, Zope, and others (some of these will run under CGI, but will run slowly and are suitable only for development purposes)

Are there any Python web frameworks that work well on NearlyFreeSpeech?

A: 

By the things they reject. I think that twisted.web is still an option there, but I don't have any experience with nearlyfreespeech.net

Santi
+5  A: 

WSGI can run on top of CGI, and popular frameworks typically run on top of WSGI, but performance is quite another issue -- since a CGI service starts afresh on each hit, any framework you may be using will need to reload from scratch each and every time, and that (in addition to opening a new connection to a DB, etc, which is basically inevitable with CGI) will make things pretty sluggish on anything but the tiniest, lightest frameworks.

Maybe something like WebOb might be tolerable, but you'll need to do some tests to check even that (how loaded those servers are is, of course, a big part of the puzzle, and you just can't tell except by testing).

Alex Martelli
+2  A: 

I got web.py to work on nearly free speech a few years ago by fooling with its WSGI stuff to run on CGI. It was just slightly too slow to be usable though.

I've made a few Python web applications hosted on nearly free speech just using the CGI module, and they are actually plenty fast even with high traffic. Example: www.gigbayes.com.

Greg
A: 

Well, if what you really need is just free hosting for a Python web app, Google AppEngine is a nice alternative and you won't be as limited on choice of frameworks.

Matt Good
appengine is more restrictive. very few frameworks can easily be installed on appengine, while it is possible to write a cgi wrapper for fastcgi, scgi, wsgi apps.
Eric Drechsel
NearlyFreeSpeech kills off long-running processes, so even a CGI wrapper is not a particularly efficient solution. AppEngine includes Django, which is quite popular, though I had no trouble using Werkzeug with it. CGI is fine for small form-handling scripts, but I wouldn't attempt using it for any apps that were complex enough to require a framework.
Matt Good