Hacker News new | ask | show | jobs
by Brainix 3501 days ago
Flask! It's Pythonic and good. Once you've done a couple of Flask projects, you can spin up a new microservice in a couple of hours. It's much lighter weight than Django, so it forces you to keep fewer moving parts in your head while hacking.

http://flask.pocoo.org/

Lately, I've been using Flask on the back-end, and React on the front-end.

7 comments

It's more lightweight than Django until you add packages for all of the components you need to build a production-grade app. To get what Django has out of the box requires a half-dozen packages, and even with that Flask-Admin is super primitive compared to what Django Admin provides. I try to like Flask, and I currently run my small personal site in it, but almost every project I start in Flask, I end up rewriting in Django.

As far as building APIs goes, Django Rest Framework provides so much. I find myself reinventing a lot when I use Flask vs Django + DRF. Just my 2ยข.

I keep thinking I'll learn Django, but I hate Django, why would I want to build a skill that I'm then forced to use, as well as proliferating the market for Django products?

I work on Flask stuff on purpose, because it means in the future I'll have more Flask work...

Flask is much more pythonic than django.

In fact, go look at Django's website/documentation, they don't have a hello world or a quickstart, they have like a 10-page tutorial to build some frankenstein nonsense, Flask's homepage has a 5 line application! That's how Python is supposed to be.

The more flask in the world, the better.

edit: now I've read some other people here saying Django gets easier after you use it, or it's gotten simpler... Flask is easy the first time you use it, and it's always been simple. Pythonic. End rant.

You could write Hello World the same way in Django with nothing more than one route and one view. However, the Django tutorial is longer, I think 6 pages, because it provides so much more out of the box. The Flask tutorial would be the same length if it covered topics like a variety of views, templates, serialization, SQLAlchemy, migrations, model design, etc.

Flask actually has a tutorial just like this in the docs [1].

I think you should give Django a chance to be able to compare the two frameworks in these kinds of aspects.

[1]: http://flask.pocoo.org/docs/0.11/tutorial/

I love Flask. I'm not a professional but for hobby projects I find it very easy to use. I have a template now and I can get a basic backend going in 30 mins.

For more serious projects, we use Flask for big commercial products and work and it's very good. Unlike some other tools, what I like about it is that it's very easy to look at the code in a Flask project and immediately understand what is going on.

I also use and love Flask for exactly these reasons. Additionally I've been playing around with Flask_Restful and have been very pleased with the results.
Hi Everyone. I'm actually working on a "starter" project that only focuses on the backend. It uses Flask and PostgresQL and includes fabric deployment scripts to get the app running on Debian. Please check it out and let me know what you think

https://github.com/johnwheeler/mvp-starter

Same here. I love Flask. Writing APIs are super simple.
I usually combine flask_restful, SQLalchemy and a SQLite database. Stupidly easy to build an API this way...