Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selecting a Python Web Framework

This may seem like a subjective question. But it is not (that's not the idea, at least).

I'm developing an Advertising software (like AdWords, AdBrite, etc) and i've decide to use Python. And would like to use one of those well known web frameworks (Django, Cherrypy, pylons, etc).

The question is:

Given that it will have just a few Models (seven or eight), which has the best cache support? and What is the most efficient retrieving data from a MySQL database?

Thanks!

like image 564
santiagobasulto Avatar asked Sep 23 '10 19:09

santiagobasulto


4 Answers

check out Flask. Its easy, its fast, works on top of Werkzeug, uses Jinja2 templating and SQLAlchemy for the model domain. http://flask.pocoo.org/

like image 82
dekomote Avatar answered Nov 14 '22 01:11

dekomote


Performance should be more or less equal. If you want to keep it simple look at cherrypy, pylons and other lightweight frameworks.

-> http://wiki.python.org/moin/WebFrameworks gives a nice overview.

like image 32
tauran Avatar answered Nov 14 '22 01:11

tauran


If you want to use Python to do complex SQL queries on your database, e.g. eagerloading or filtering on the fly you might be wanting SQLAlchemy.

TurboGears 2 is a framework which comes with SQLAlchemy as standard, check out their caching page for more info on the second part of your answer.

like image 38
EoghanM Avatar answered Nov 14 '22 00:11

EoghanM


CherryPy is the only framework I'm aware of that does real HTTP caching out of the box (but look at "beaker" for a WSGI component solution). Many of the others give you tools to store arbitrary objects in Memcached or other storage.

like image 34
fumanchu Avatar answered Nov 13 '22 23:11

fumanchu