I was happily using bottle for a while until I discovered flask . I found flask to have better documentation and better support for important middleware features, such as csrf protection and session-support. Flask also uses decorators for routing / templates.
Joke: Damn flask people injecting in every bottle thread!
A quick check reveals (only core *.py files).
Bottle: 1938 (lines of code, 1 file only)
Flask (including dependencies Jinja2, Werkzeug, not including tests, debug, apps, contrib): 24179 (lines of code)
web2py (not including tests, apps, contrib, database abstraction layer but including templates, html helpers, form generation and processing libraries, and syntax highligther and all handlers) 23469 (lines of code)
For people who want a MICRO framework. I think Bottle wins by one order of magnitude.
EDIT: Before touchy people jump up and down: I added web2py as a reference point. I am not comparing it with Bottle and Flask. I am not saying it is a micro framework. If I had Django or Pylons installed I would have added them as reference points too (I would not know how to separate the ORM). Perhaps other redditors can contribute numbers and verify mine.
10
u/Siraf Dec 21 '10
I was happily using bottle for a while until I discovered flask . I found flask to have better documentation and better support for important middleware features, such as csrf protection and session-support. Flask also uses decorators for routing / templates.
I do like bottle for its cgi support, however.