The big difference is that Flask is based on other technologies such as Werkzeug and Jinja2 that exist for a longer time and it does not try to reinvent things. Bottle on the other hand tries to stick to the one-file approach. I want to merge them but the Bottle developer does not seem to be very happy about the idea of stepping away from the “one file” requirement.
Regarding flexibility: there are no reasons you shouldn't be able to use flask with other template engines if that's what you're after. In fact, things like Flask-Genshi exist: Flask-Genshi and it's incredible easy to use mako with it, even without extension if you want to.
Bias warning: I am the developer of Flask, Werkzeug and Jinja2.
In my own experience, both are great, and similar. For a simple REST API bottle has an added advantage of being a single file which is nice to just include with all of your other code rather than having to install anything. Flask, however, is my go-to framework. I used it extensively at a previous job and still do today with my current employer (and the app is pretty substantial). Flask also has a lot of extension support now. A pip freeze | grep Flask yields the following for one project.
>The big difference is that Flask is based on other technologies such as Werkzeug and Jinja2 that exist for a longer time and it does not try to reinvent things. Bottle on the other hand tries to stick to the one-file approach. I want to merge them but the Bottle developer does not seem to be very happy about the idea of stepping away from the “one file” requirement.
And seeing that Flask still does not support Python 3, while Bottle does, I'm happy with the decision of the Bottle developer.
Not to mention that the "one file" makes deployment very easy.
Plus: Bottle is quite faster than Flask, even if you count the overhead of a DB query:
> Plus: Bottle is quite faster than Flask, even if you count the overhead of a DB query:
If you see bottle being faster than Flask in a real-world benchmark and the difference the problem there are still knobs to turn if you need to. Flask does not optimize at all for Benchmarks and you pay for some overhead out of the box for a better development experience.
In my mind, there are two main differences. First bottle supports Python 3. Second, Flask is built on Werkzeug, which is a very flexible WSGI toolkit. In practice, I have never used Werkzeug much, except for the excellect stacktrace pages, which let you run the debugger right where you problem failed. I pick bottle for new projects, basically because of the Python 3 support. Fixing unicode is worth quite a lot to me.
Also, Flask the concept of modules/Blueprints for building larger apps. I'm not sure whether Bottle does or not, but the bottle website seems to imply that it's optimized for single file applications.
I used Bottle for a small learning project, though, and found conceptually a lot of things are very similar. We ended up using Flask because it seemed better constructs were in to use it as a foundation for a large code-base, similar to Django, but custom built with legos.