"Instant Flask Web Development" by Ron DuPlain (Packt Publishing http://www.packtpub.com/flask-web-development/book) is intended to be an introduction to Flask, a lightweight web application framework written in Python and based on the Werkzeug WSGI toolkit and Jinja2 template engine.
The book takes a tutorial style approach, building
up an example appointment-management web application using Flask and
introducing various features of the framework on the way. As the example
application becomes more complicated, additional Python packages are
covered which are not part of the Flask framework (for example SQLAlchemy for managing interactions with a
database backend, and WTForm for handling form generation and
validation) along with various Flask extensions that can be used for
more complicated tasks (for example managing user logins and sessions). The final section of the book gives an overview of how to deploy the
application in a production environment, using gunicorn (a Python WSGI server) and nginx.
its length (just short of 70 pages) the book is quite ambitious in the
amount of ground that it attempts to cover, and it's quite impressive
how much the author has managed to pack in whilst maintaining a light
touch with the material. So while inevitably there is a limit to the level of detail that
can be fitted in, there are some excellent and concise overviews of
many of the topics that could act as excellent starting points for more
experienced developers (for me the section on SQLAlchemy is a particular
highlight). Overall the pacing of the book is also quite sprightly and
conveys a sense of how quickly and easily Flask could be used to build a
web application from scratch.
The flipside of the
book's brevity is that it cannot possibly contain everything that a
developer needs to know (although this is mitigated to some extent by
extensive references to online documentation and resources). In this
regard it is really more a showcase for Flask, and is best viewed as a
good starting point for someone wishing to quickly get up to speed with the framework's potential. I'd also question how suitable this is for
newcomers to either Python, or to web programming in general - I felt that some of the concepts and example code (for example the sudden appearance of a feature implemented using Ajax) might be a bit of a stretch for a novice. Also there are some occasional frustrating glitches in the text and example code which meant
it took a bit of additional reading and debugging in places to get the
example application working in practice.
then: I'd recommend this book as a good starting point for developers
who already have some familiarity with web application development, and
who are interested in a quick introduction to the key components of Flask and how they're used - with the
caveat that you will most likely have to refer to other resources to get
the most out of it.
Disclosure: a free e-copy of this book
was received from the publisher for review purposes; this review has
also been submitted to Amazon. The opinions expressed here are entirely my own.