开发者

Stack recommendations for small/medium-sized web application in Python

开发者 https://www.devze.com 2022-12-31 01:54 出处:网络
I\'m looking for some recommendations for a p开发者_Python百科ython web application. We have some memory restrictions and we try to keep it small and lean.

I'm looking for some recommendations for a p开发者_Python百科ython 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


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.


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.


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


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.


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消