tags:

views:

142

answers:

6

I'm looking for some recommendations for a python web application. We have some memory restrictions and we try to keep it small and lean.

We thought about using WSGI (and a python webserver) and build the rest ourself. We already have a template engine we'd like to use, but we are open for some suggestions regarding the whole request handling (the controller).

The application has to run in a single process and the requests have to be processed with multiple threads.

We've looked at django, but we are a not sure if it fits into our memory budget.

Your feedback is very welcome!

Cheers, Reto

+2  A: 

You can run an django application in 20 mb memory easily. probably a django application will use less memory than 20mb.

I want to advise you to check webpy and cherrypy

but I'm big fan of django. if you have 20 mb memory to run application, django will give you everythig it has.

mumino
+1  A: 

You could take a look at Twisted, which has a module twisted.web. That seems to be fairly light-weight. I'm currently using it, and with a simple app it starts almost instantaneously, so it can't be all that resource intensive :)

I don't know whether Twisted uses different threads.

extraneon
A: 

webpy (http://webpy.org/) is a very minimal memory footprint but highly usable framework. But it all depends on how complex your application is going to be.

rajasaur
+1  A: 

I'd go for bottle. It has all the conciseness of web.py but with some nice routing features.

Ben Hughes
+2  A: 

I've been using Werkzeug because it's more a small collection of really useful components than a whole framework. It runs behind a wsgi server of your choice (and comes with a built-in one). If you want something even easier, Flask might be worth a look. Also, you might want to bookmark the rather speedy Jinja in case your template engine doesn't pan out. Those folks over at pocoo.org have been releasing some nice stuff.

Forest
A: 

Also please take a look at WHIFF. It's tiny and very flexible whiff documentation

Aaron Watters