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?
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?
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:
"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/
It's definitely nice to see other responses here that are from people who are, first hand, using Flask in high-traffic live deployments. I'd just be careful about drawing conclusions based on who has it somewhere in their stack without any context.
To be fair to your skepticism, I have probably followed Twilio more than you've had. I seem to remember that they switched to Flask, so I don't think it was technical debt that they had to work around later on. (like it might have been the case with Facebook and PHP)
Let's say that "Twilio uses Flask for their API" answers the question "can it be used in production?" (or "is it a serious project today?"). "Should you use it in production?" is where context matters more.
No, the argument is the same: "Facebook runs on PHP, so PHP must be stable".
Which makes sense. A base technology that holds up with half a billion users, I would call production ready.
As for fast, if you look at the most comprehensive benchmarks, PHP is more or less on par with Ruby/Python for raw speed of simple page serving, but when multiple DB connections are used in a page (which is the most common case for dynamic pages), it leaps far ahead, and reaches Servlet and Go levels of reqs/sec.
Every request to new-ish parts of the Twilio API touches Flask, and it's performed like a champ.
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.
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 :)
After numerous purges (the magic-removal-branch being the biggest) and deprecations over the years since 1.0, Django is IMO pretty magic-free. If you have suggestions of what isn't Pythonic enough, I think the core team would appreciate a ticket on Trac:
https://code.djangoproject.com/newticketI 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.