Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What python web frameworks work well with CGI (e.g. on nearlyfreespeech.net)?

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?

like image 413
Jim Avatar asked Sep 14 '09 18:09

Jim


People also ask

What web framework does Python use?

1| Django. About: Django, an open-source framework, is a popular high-level web framework in Python which supports rapid web development and design. Django helps developers avoid various common security mistakes. With this framework, developers can take web applications from concept to launch within hours.

Which is the easiest Python framework?

Flask. Flask is considered a microframework. It comes with basic functionality, while also allowing for easy expansion. Therefore, Flask works more as the glue that allows you to join libraries with each other.

How many web frameworks are there in Python?

There are primarily three types of Python frameworks, namely full-stack, micro-framework, and asynchronous.


2 Answers

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).

like image 67
Alex Martelli Avatar answered Oct 24 '22 11:10

Alex Martelli


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.

like image 36
Greg Avatar answered Oct 24 '22 13:10

Greg