Originally Posted by Quasimojo
Why *not* use Django? Enquiring minds want to know.
Firstly, I don't want to sound like I think Django is horrible. It isn't, but good is enemy to the best.
Django was one of the first (if not the first) major web development toolset for python. The problem here is that it has been forced to keep lots of ways of doing things (despite there being better methods) simply because of inertia. A glaring example of this is the Django ORM. SQLALchemy is far more flexible and (in the view of myself and quite a lot of other developers) nicer to use than the Django ORM, but Django can't change as all the old code would break.
The next issue is speed, Flask only uses what you want to use reducing total code which impacts both maintenance and performance while an entire layer of abstraction (that isn't any faster for development if you understand a little about how the web works) falls away. In addition, due to the smaller size, security audits of the entire stack are likely to be easier and more thorough. Another major benefit here is that you can choose the libraries you want to work with.
The major pitfall I can think of is that there isn't a really good CMS for Flask, but I didn't care for most of the Django ones either. While rolling your own isn't especially hard, it does take time.
A final voice on the topic would be Steve Huffman (co-founder of Reddit). I was curious about Udacity a while back and opted to check out their Web Application Engineering course. I started to see how good the courses were compared to a regular university and watched through the entire course simply because I was curious about his perspective on development.
When Reddit merged with another startup, the startup had their own web framework called web.py that they were familiar with, so the site was rewritten from lisp to python. Some time later, the site was facing the choice of either extending the capabilities of web.py or rewriting to be able to use the existing features of Django. They chose Django. According to Huffman, when he finally sold the company, they had needed to rewrite almost all of django anyway because Django does 90% of things, but must altered at the core level to be able to accomplish that last 10%. The only thing they couldn't afford to rewrite was the ORM despite their desire for a better fit for their needs.
web.py still exists in an almost completely unmaintained state. A very similar, but improved framework (Flask) grew up to offer the same flexibility while offering the missing features and a ton of optional libraries (many of which are bug tested by the Flask maintainers despite not being part of Flask).
For the record, I no longer use Python for new web development (though it's great for scripting, numpy, pyQt, etc). I currently use Ruby and the Sinatra framework (which was the inspiration for web.py, Flask, and a ton of other frameworks in over a dozen languages), but I'm working toward a usable Sinatra-alike written in Shen lisp.
edit: here's another guy's perspective
and here's an entire dev team's view (they seem to have done a lot of homework on this topic)
Kenneth Reitz's opinion (FWIW)
some basic speed tests (a little too basic IMHO, but it's what I found for you)
Edited by hajile - 5/23/13 at 7:11am