Flask Book and PyCon Update

Posted by
on under

With my book already available for pre-order at Amazon.com I thought an update is in order.

If you look in the Amazon page the release date was set sometime in May 2014. I suppose this date is based on the writing deadline I agreed to in my contract, which is in February, plus the time the publisher needs to get the print version of the book out. It is quite possible that the book will show up as an early release e-book well before the official publication date.

You probably want to have an idea of progress. I'm happy to report that I have finished the writing part. I'm currently doing a review pass to edit the material and ensure there is consistency across chapters. I'm also working with awesome technical reviewers from the Python community that will make sure the quality is up there where you and I want it to be.

I imagine you also want to have some idea of the contents. The book is structured as a large tutorial that spans the entire book, with the chapters logically grouped into three parts.

In Part I the Flask framework and several core extensions are introduced. Here you'll learn about view functions, templates, web forms and databases, all within the context of single-file applications. A section on how Flask works under the hood is also included in this part. In the last chapter of this part a multi-file structure for larger applications is introduced.

In Part II the multi-file structure presented at the end of Part I is used as a base to build a social blogging application. This part has chapters devoted to user authentication, user roles, administration, followers, blog post timelines, user comments and APIs. The application featured in this part is, in my opinion, several orders of magnitude better than the microblog application of the Mega-Tutorial. Blueprints are used in several of the chapters, for example, giving the application a much more clean and scalable structure. I have made an effort to follow best practices, and to be more Pythonic than in my Mega-Tutorial articles.

Part III covers the tasks required to publish the application. In this part topics such as unit testing, performance analysis, logging, deployment and application updates are covered.

The example application developed throughout the book will be hosted on github by the time the book is out, and of course you'll have access to it even if you don't buy the book.

Note that this book is not targeted at complete Python beginners. To make the best of this book you need some previous Python coding experience, and in particular a good understanding of packages, modules and classes is highly recommended. Familiarity with git and client-side technologies is also useful.

Flask Tutorial at PyCon

I thought I'd also mention that I will be hosting an in-depth three hour long Flask tutorial at PyCon in Montréal, Canada on Thursday, April 10, 2014.

If you decide to register for my class, you will have the opportunity to see me build an original, fully featured application that I'm developing specially for the event, all in front of your eyes, while I explain myself at every step and answer your questions.

If you want to learn the "Flask way" in a hands-on setting then I hope you will consider joining me in Montréal.

For PyCon registration information please visit this page. To have more information about my tutorial session visit this page, or ask me below in the comments.


Become a Patron!

Hello, and thank you for visiting my blog! If you enjoyed this article, please consider supporting my work on this blog on Patreon!

  • #1 Stéphan Bellegy said

    No doubt that with all the energy and good will you put in explaining Flask and the quality of your Mega-Tutorial, it's gonna be a must-read for web dev :-) I'm definetly looking forward to read it. So best wishes for 2014 !

  • #2 frost_asm said

    Great news. I'm looking forward for your book! Are you going to release a book in electronic format?

  • #3 Miguel Grinberg said

    @frost_asm: Yes, the book is going to be published by O'Reilly, it will be available both in print and electronic form.

  • #4 Aseem said

    Very glad to hear that the book is available for pre-order. I read your flask mega tutorial with great interest. And based on that, the moment I found about about the book, I pre-ordered it. Looking forward to receiving it.

  • #5 mark d said

    Any estimate on the pre-release date? I dont want to pre-order from amazon, becasue I want the pre-release from Oreilly.

  • #6 Miguel Grinberg said

    @mark: Unfortunately I don't have an estimate for the early release, this does not depend on me entirely. I'll send and announcement to all that signed up for info on flaskbook.com when it is available, and will also post on Twitter and FB, so make sure you get my updates either way.

  • #7 finch said

    hi, congrats from china, i would like to buy this book in PDF version,you know that it is hard to get the paperback from china. and kindle version too, any ideas for people not in USA? :)

  • #8 Miguel Grinberg said

    @finch: the book isn't out yet. When it is, it'll also be available in several e-book formats.

  • #9 dowlf said

    Book preodered. Thanks for all the great tutorials.

  • #10 stef_k said

    Just found the update and preordered, waiting for the pre or release date.

  • #11 Cory Gough said

    @Miguel: Just got a digital copy of your book! Thank you again for everyting! Looking foward to reading it!

  • #12 deepsys9 said


    Just bought the ePub version of your book from O'Rielly. I have followed your Mega tutorial for about six weeks and owe you for coming up to speed on Flask, REST api development and session logging. Your tutorials are among the best in taking a complex body of work and distilling them down into step-by-step directions. Thank you!

  • #13 Mauricio de Abreu Antunes said

    If I buy this e-book in early release, when it gets edited, will I have rights to just download the edited copy? Or shall I buy it again?

  • #14 Miguel Grinberg said

    @Mauricio: Sorry this has not been made clear. When you buy the early release e-book you get the current, unedited version immediately and then you get updates as O'Reilly makes them available. The final update that you will get is the complete, final, edited version of the e-book, so you will not need to spend any more money, you are really buying the final book.

  • #15 Danny said

    I bought your book a month ago. It's really great! Thanks to it I learned and created my first application in the Flask. In addition, I discovered a fantastic Bootsrap framework. I think your book is much better than "Instant Flask Web Development" published by Packt Publishing. Thank you! :)

  • #16 Jurian Sluiman said

    As I prefer a paper book, I will have to wait until I can order it from Amazon. But how does it exactly work with the paperback?

    From previous O'Reilly books I bought I got a coupon to download the epub version. Will this be the same for you Flask book? Also, if you have any updates after the first release, will you publish new versions in a new epud/addendum? I am looking forward to the release!

  • #17 Miguel Grinberg said

    @Jurian: I believe they sell a bundle of paper + ebook, but I'm not really sure, but they are not currently doing this, right now you can either pre-order the paper book or buy the e-book. If you buy the e-book you get the current manuscript and all future updates.

  • #18 Jim said

    Love your tuts online here so was looking forward to getting the book in digital form. Went and looked at the previews online and had a question. It appears that the online e-book version uses a serif font like Times Roman. I find this much less readable than sans serif like you use on the website. Is there a reason in 2014 professional publishers are using that font type when viewing on screen? Can I change the font if I purchase the online copy?

    It's funny that your code blocks are in sans serif and the explanation text is in the cave wall font.

  • #19 Miguel Grinberg said

    @Jim: I have no control over the styling of the book or the e-book. The e-book is a PDF, if your PDF viewer allows you to change fonts then you should be able to.

  • #20 bs said


    I bought the book and it is really great! I tried to review it but on O’Reilly the link leads to a white page.

    I have a question about request dispatching, for instance regarding “Password updates” (p. 109). When current_user.is_authenticated() in “base.html” I get to url_for(‘auth.change_password’). What I understood is that now Flask is looking in app/auth/views.py. There I found @auth.route(/change-password) … def change_password().The rule name is written differently and I asked myself why, then I changed with another name and the page still work. Why?

    Why most books and tutorials refer to virtualenv and not to conda? I actually found easy to create a conda env, especially for the option of choosing the python version.

    It would be nice to have had examples of deployment on other platforms than Heroku, like DigitalOcean and Linode.

    I hope you write another book about advanced topics on Flask maybe with an eye on scientific issues like I found here (also great) https://github.com/hplgit/web4sciapps/tree/master/doc/src/web4sa.

    Thanks in advance and best regards,

  • #21 Miguel Grinberg said

    @bs: url_for takes the "endpoint" name as argument. This is the name of the function.

    Regarding conda, it is a valid option, but it isn't the official Python distribution, for a book about Python it makes sense that all the examples are presented with the official CPython interpreter, in my opinion.

    On the topic of deployment, Digital Ocean is not a platform, you just get a virtual server from them. There are infinite options to deploy to a server there, since you have lots of ways to configure the server. The "Traditional Hosting" section in the book gives some information about what to expect, but if you want detailed information you can probably find Digital Ocean tutorials specific to your chosen platform.


Leave a Comment