Saturday, March 29, 2014

Flask Workshop in Portland

I spent much of the day geeking out with peers at what was billed as intermediate Python level, a dive into a 3rd party micro-web-framework named Flask.  We had the good fortune to be taught by the new O'Reilly author, Miguel Grinberg, software engineer and film maker.  He'll be presenting this tutorial at Pycon later this month in Montreal and was eager for a dry run or dress rehearsal one might call it.  That was great for us, with Idealist sponsoring with catered tamales, a very generous number.  Urban Airship provided facilities in this building used by our wind energy sector (windmills).

When you feed an http request to a Flask framework, it routes to functions with URL bits available as arguments.  The functions usually prepare a response object that goes back to the client browser.  What happens in between (between the ears of the web service) is what we call the application, and Flask is merely a framework, like clay.  Miguel had shaped it into a password protected service that had login, cookies, database access, email, iconic "gravatars", the whole nine yards.  He really touched on a lot of deep features, not dumbing it down for us, yet keeping it moving.  The applause was sincere, and for Flask as well i.e. I think we appreciated its straightforward yet powerful design.

I'm not seeing web frameworks, even just those within the Python sphere, as being at each others' throats in some Wild Kingdom, narrated by some gringo, sponsored by whatever insurance company.  It's not a Darwinian circus.

We're talking more like models of airplane, with Django more heavy / commercial, geared stereotypically for newspaper sites (which covers many cases) and Flask more the ultralight, with many frameworks in between like web2py.

Jinja2 is a sophisticated templating engine.

The back end might be PostgreSQL with postGIS options enable.

So in calling Flask "ultra-light" I'm not suggesting it's under-powered (you sit it behind Apache probably), just simple enough to wrap a lot of power tools and get them working together in a manner that pleases at least some web developers.

You can even just use it locally on your own machine, why not?  Play on some, work on others.

By the way, lest events overtake me, allow me to put a stub link here (in my own blog), Wiki style, to a post I want to write about the most recent Thirsters gathering on East Broadway.  There's an idealist theme connecting them.

I was greatly encouraged to learn more about how anthropologists are conducting themselves these days, adding to my respect of that profession and its ethics.  We had some Reed faculty present, at least one, and Forest Service, not sure what other government agencies.

Our topic was relations with "first peoples" as we might call them, descendents of earlier waves of migrants, going back some 10K years.  There's no sense in which "the Indians were all wiped out" and live on only in museums and interpretive centers.  To think that way is to live in deep ignorance.  However, I do understand where someone living in present day (2014) Philadelphia might get that impression.