
New Werkzeug and Flask Releases - ch0wn
http://lucumr.pocoo.org/2013/6/13/werkzeug-and-flask-releases/
======
bjourne
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.

~~~
calpaterson
For what it's worth, the internals of Bottle are very clean (and extremely
simple - the entire library/framework is just one file).

~~~
the_mitsuhiko
I know I'm biased on that, but if the internals of Bottle are clean it's doing
something wrong :) WSGI/HTTP are incredible complex and in fact, too complex
to fit into a single Python file.

There is a good reason for why Werkzeug (which Flask is based on) is 15000
lines of code.

~~~
aptwebapps
It's in a single file which happens to be a little under 3500 lines long ...

~~~
habitue
Right, he's implying that the implementation is not as complete, or is
incorrect because the problem space is more complex than that.

~~~
coldtea
He is implying with not any evidence, aka FUD.

~~~
irahul
He is implying with the evidence that werkzeug which he wrote is much bigger
than bottle owing to complexities of wsgi/http, and bottle's smaller size
means either the implementation is incomplete or the implementation is too
clever or both.

~~~
coldtea
Still no evidence in your comment.

Repeating his "I had to make X big to support all of wsgi/http so anyone who
made a similar framework but much smaller has made it incomplete or too
succint and clever in a bad way" is not evidence.

You say:

> _bottle 's smaller size means either the implementation is incomplete or the
> implementation is too clever or both._

That's a statement of fact (actually a dichotomy of facts). What's the
evidence to support these are the only two possible options?

The mere fact that Armin had to make Werkzeug bigger "owing to complexities of
wsgi/http" is not proof.

To take it as proof is to assume his coding (and understanding of wsgi/http)
as the golden standard by which the Bottle developer should be measured.

Who said this is the case? For one, it took him a year after Bottle to support
Python 3, so he might not be that focused, anyway.

My problem is that, the way he and you say it, "incomplete" implies broken or
lacking, whereas "too clever" implies fancy tricky code that's too succinct
for it's own good.

How about the third option that he needlessly convoluted Werkzeug to work
around wsgi/http edge cases that no one really faces, whereas Bottle has been
pragmatic about it?

Or the fourth option, that Werkzeug is needlessly verbose, whereas Bottle is
not "too clever" but just as clever as needed?

~~~
jessaustin
It would have taken less effort just to try out both frameworks, and then you
wouldn't need anyone else's "evidence".

~~~
coldtea
> _It would have taken less effort just to try out both frameworks, and then
> you wouldn 't need anyone else's "evidence"_

I've tried both frameworks, and looked at the code for both, and I'm of the
opposite opinion.

Yours is not a very suggestion. It presupposes what is asked to provide
evidence for. That's called a circular argument.

------
landypro
The Flask docs have a small write-up on the things to look out for before
jumping ship to Python 3.
[http://flask.pocoo.org/docs/python3/](http://flask.pocoo.org/docs/python3/)

------
corford
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...)

------
manuletroll
Python 3 support! Now I can make the switch. Congratulations to Armin and all
contributors, and a big thank you!

------
clicks
Terrific news! Many thanks to all who made it possible.

[https://python3wos.appspot.com/](https://python3wos.appspot.com/) needs an
update. :)

~~~
jdboyd
That will update once the author of flask updates its pypi entry.

------
cstuder
So we're a PHP shop thinking about moving to Python. With this release, can we
immediately start using version 3?

The Flask page still recommends holding back...
([http://flask.pocoo.org/docs/python3/](http://flask.pocoo.org/docs/python3/))

~~~
corford
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.

------
kryten
I picked up flask for a one off helpdesk request frontend for someone a few
months ago.

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
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?

~~~
Timothee
Twilio uses it to run their API. So, that must be very reliable.

"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/](http://flask-
restful.readthedocs.org/en/latest/)

~~~
obviouslygreen
While I'm not disagreeing on the quality of Flask, "x uses y, so y must be
stable" is the same kind of argument as "Facebook runs on PHP, so PHP must be
blazing fast." Yeah, there are large web companies using all sorts of tech,
but what _else_ they're using alongside it and how they've adapted it to their
needs make this sort of commentary questionable at best.

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.

~~~
coldtea
> _While I 'm not disagreeing on the quality of Flask, "x uses y, so y must be
> stable" is the same kind of argument as "Facebook runs on PHP, so PHP must
> be blazing fast."_

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.

------
fyolnish
I clicked this expecting a new release from Farbrausch : /

~~~
dualogy
Unlikely, right? Also their stuff uses double-k, so it's werkkzeug IIRC..

------
drawkbox
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.

------
galaktor
Here I was thinking this was about "werkkzeug" by Farbrausch

~~~
voltagex_
The popular demo!

~~~
leeoniya
pretty sure werkkzeug was the tool, not the demo

~~~
voltagex_
Yeah, just reminiscing.

------
chris_mahan
[http://werkzeug.pocoo.org/download](http://werkzeug.pocoo.org/download) 404

~~~
joeyespo
This was changed to
[https://pypi.python.org/pypi/Werkzeug](https://pypi.python.org/pypi/Werkzeug)

See
[https://github.com/mitsuhiko/werkzeug/commit/6e74b5be39d2409...](https://github.com/mitsuhiko/werkzeug/commit/6e74b5be39d2409a9e7f9d1a6e2bafef729c863b)

~~~
chris_mahan
The "Download page" link in
[http://werkzeug.pocoo.org/docs/installation/](http://werkzeug.pocoo.org/docs/installation/)
needs to be fixed then!

(From the tarball release Download the most recent tarball from the download
page.)

------
sigzero
This is awesome. Been waiting to use it!

------
taude
Time to update some extensions!

