views:

228

answers:

5

Hello everybody.

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!

+2  A: 

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.

tauran
Thanks for the URL
santiagobasulto
+3  A: 

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/

dekomote
Thanks @dekomote, i'll take a look. But i'm looking for a really mature framework.
santiagobasulto
A: 

I am only familiar with Django, and can tell you that it has a very robust middleware handler and very straightforward cache management. Also, the ORM (object-relational mapper; connect objects to databases) can have Postgre or MySQL as the engine, so you are free to choose the fastest one (I think that other frameworks use SQLAlchemy's ORM, which is also super cool and fast)

Check:

  1. Middleware
  2. Cache
Arrieta
+1  A: 

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.

EoghanM
+1  A: 

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.

fumanchu