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.
Actually, I didn't consider the dependencies. Good call. Flask is definitely somewhere between django and bottle in terms of dependencies. I typically have a flask installation up and running in 10 minutes thanks to pip, gunicorn, and virtualenv.
EDIT: I apologize for the previous joke. It was not on you. It was on me.
I am not sure where Django stands in terms of size if you take out the ORM (Flask does not include one), contrib and tests (I did not include them in my Flask measurement) and the apps (Django has admin and the scaffolding app for example). Probably Flask and Django score pretty close... like Flask and web2py do. Which was the point I tried to make.
Once you include SQLALchemy in Flask or Bottle things change dramatically. In terms of lines of code SQLALchemy is 40,000+ lines of code, bigger than the entire web2py+dal. I would not be surprised if Flask+SQLAlchemy is larger than Django.
I would like to see the people involved publish some numbers. Ideally I would like to see numbers broken by category (core, dal/orm, contrib, apps, tests) not counting blank lines and comments in code.
The web2py dal is a single file and 4949 lines. I think it would make a good pair with bottle. We just changed the license to LGPL3 so it would not affect apps built with it.
9
u/mdipierro Dec 22 '10 edited Dec 22 '10
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.