Flask is about the most beautiful Python code you can write. Check out any other Python framework and they may have a decent api, but on the inside it is messy and confusing. Reading Flask source code on the other hand is a joy. There's no crazy stuff and few convoluted pieces + lots of comments so it is really easy to hack something if you must. Any Python coder who wants to improve their game definitely should study Flask because it is such a great piece of software engineering.
Check out any other Python framework and they may have a decent api, but on the inside it is messy and confusing.
This is a really disingenuous generalization. If it's not Flask, it's messy and confusing? Telling every framework developer who's not the author of this one library that their code is crap not only isn't a great way to be taken seriously, it's wrong and just kind of mean.
> There's no crazy stuff and few convoluted pieces
I dunno, I've recently started getting into it and "convoluted" is one word that has occurred to me more than once. Handlers vs signals, application and request context, context locals, local proxies, etc.. Probably there's a good reason for all these and the docs make a decent attempt to lay them out but overall my unscientific first impression is that it's not exactly a pinnacle of simplicity.
Congrats & well done guys :) Flask was the last major block preventing me from seriously moving over to Python3 so I guess that means it's time to begin porting! (there goes my weekend...)
Like irahul has said, the issue is the Flask extension ecosystem and documentation lag rather than Flask itself. Which basically means YMMV depending on what you need to get done :)
If you are writing most of your own code and not using Flask extensions then you could well be fine (unless, like the linked post says, you discover a few months down the line you _do_ need a couple of extensions and they haven't been ported yet!).
Also worth pointing out that lots of other great python libraries now fully support python3 so you can get a lot done with just Flask on its own and those e.g. requests, redis-py, psycopg2, pytz.
> With this release, can we immediately start using version 3?
You should stick with 2.7 As mentioned in your linked blog post, porting Flask to Python 3 wasn't the issue. The issue is the other libraries which you will use to build your web application which aren't on Python 3 yet. You can try to build a unified code base(runs on both 2.7 and 3) http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/
I read somewhere that Flask was born as an Aprils first joke.
So I ask. How safe is it to use in a real project? Is it a serious project today? Would you recommend Flask to someone who has never done any server side programming?
Regardless of Flask's humble beginnings, it is indeed a serious project, very stable, and quite awesome. And yes, I would recommend it for your use, assuming you want to learn Python as a whole. Flask is easy enough that you can start building an app right away, but at the same time, it leaves out all the extra 'magic' that ship with things like Django, so you'll be learning a lot more Python as you add onto your app. It's a great mix of simplicity and power, and is great for learning. Go for it.
We use flask at fusic.com and find it very reliable and easy to work with.
Our peaks have over 1m rpm, and it has never fails us.
We did a huge project migrating from Django, and now we don't have to jump through hoops so much.
I think flask has a front page that discourages newcomers, as it does not look as serious as Django, and gives the feeling that is it not mature enough, or documented.
I tried convincing a new startup to use it and failed for those reasons.
Flask is a very solid python microframework and a joy to work with. So nice it is on Python 3 (3.3+) now. boto is the only thing needed for full on Python 3 here.
[+] [-] bjourne|12 years ago|reply
[+] [-] obviouslygreen|12 years ago|reply
This is a really disingenuous generalization. If it's not Flask, it's messy and confusing? Telling every framework developer who's not the author of this one library that their code is crap not only isn't a great way to be taken seriously, it's wrong and just kind of mean.
[+] [-] reinhardt|12 years ago|reply
I dunno, I've recently started getting into it and "convoluted" is one word that has occurred to me more than once. Handlers vs signals, application and request context, context locals, local proxies, etc.. Probably there's a good reason for all these and the docs make a decent attempt to lay them out but overall my unscientific first impression is that it's not exactly a pinnacle of simplicity.
[+] [-] coleifer|12 years ago|reply
[+] [-] calpaterson|12 years ago|reply
[+] [-] landypro|12 years ago|reply
[+] [-] corford|12 years ago|reply
[+] [-] manuletroll|12 years ago|reply
[+] [-] clicks|12 years ago|reply
https://python3wos.appspot.com/ needs an update. :)
[+] [-] jdboyd|12 years ago|reply
[+] [-] cstuder|12 years ago|reply
The Flask page still recommends holding back... (http://flask.pocoo.org/docs/python3/)
[+] [-] corford|12 years ago|reply
If you are writing most of your own code and not using Flask extensions then you could well be fine (unless, like the linked post says, you discover a few months down the line you _do_ need a couple of extensions and they haven't been ported yet!).
Also worth pointing out that lots of other great python libraries now fully support python3 so you can get a lot done with just Flask on its own and those e.g. requests, redis-py, psycopg2, pytz.
[+] [-] irahul|12 years ago|reply
You should stick with 2.7 As mentioned in your linked blog post, porting Flask to Python 3 wasn't the issue. The issue is the other libraries which you will use to build your web application which aren't on Python 3 yet. You can try to build a unified code base(runs on both 2.7 and 3) http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/
[+] [-] kryten|12 years ago|reply
Compared to asp.net, its an absolute joy to work with. It makes me not want to grind my face off with a blunt spoon :)
Glad to see some awesome progress with it.
[+] [-] danibx|12 years ago|reply
So I ask. How safe is it to use in a real project? Is it a serious project today? Would you recommend Flask to someone who has never done any server side programming?
[+] [-] alexk|12 years ago|reply
We (mailgun.com) use it in production, our deployment handles thousands of requests/sec, we have not seen any flask-related issues so far in 2+ years.
You can use pool of flask + twisted powered services behind nginxes:
Nginx ---upstream pool--> twisted.wsgi + thread pool + flask app
Something like that:
https://gist.github.com/klizhentas/5775158
[+] [-] Timothee|12 years ago|reply
"Flask-RESTful was initially developed as an internal project at Twilio, built to power their public and internal APIs" http://flask-restful.readthedocs.org/en/latest/
[+] [-] philfreo|12 years ago|reply
If you're building a complex web app with it, just be sure to checkout all the Flask extensions so you don't have to reinvent the wheel too much.
[+] [-] corford|12 years ago|reply
Though I think they may have recently replaced this bit of their architecture with Go?
FWIW, I've chosen Flask to power my startup and have no regrets at all. It's a joy to work with and rock solid :)
[+] [-] dkh|12 years ago|reply
[+] [-] xenator|12 years ago|reply
[+] [-] liranz|12 years ago|reply
I think flask has a front page that discourages newcomers, as it does not look as serious as Django, and gives the feeling that is it not mature enough, or documented. I tried convincing a new startup to use it and failed for those reasons.
[+] [-] fyolnish|12 years ago|reply
[+] [-] dualogy|12 years ago|reply
[+] [-] drawkbox|12 years ago|reply
[+] [-] galaktor|12 years ago|reply
[+] [-] voltagex_|12 years ago|reply
[+] [-] chris_mahan|12 years ago|reply
[+] [-] joeyespo|12 years ago|reply
See https://github.com/mitsuhiko/werkzeug/commit/6e74b5be39d2409...
[+] [-] sigzero|12 years ago|reply
[+] [-] taude|12 years ago|reply