Web Development With Flask

You probably noticed that lately I haven't been blogging as frequently as I used to. Today I'm letting you in on my little secret:

Flask Book front page

I wish I could share the actual cover of the book featuring a cool animal, but for now the front page will have to do since the cover hasn't been designed yet.

So now you know. I'm writing a book on Flask. But what does that mean? How will the book be different from the Mega-Tutorial series?

When I wrote the first Mega-Tutorial article I didn't know how many articles the entire series would have, nor the specific topics I was going to cover. I just went with the flow and wrote about what I found interesting at the time. It was a learning experience for me.

Writing a book is much more difficult. I have to make sure that there is consistency (both in technical content and writing style) between all the chapters. It's like writing a single very long article that is published all at once and that must be as polished as possible from the start, since making corrections after publication, while possible, is a more complicated process than editing a blog post.

I expect there will be some similarities between the Mega-Tutorial and the book. The book will feature a web application, but it will not be microblog. The structure of the new application will be better than that of microblog, which grew organically as I developed it. I will make this new application available online as a demonstration at some point in the future. This is, of course, a dirty strategy. I will be showing you the eye candy to tempt you to go get the book!

Some of the topics I covered in the tutorial will also appear in the book, but there are a number of topics I did not feature in the series that will receive attention in the book. I haven't determined what the final structure of the book is yet, but I know the following topics are among those that will be covered in detail:

  • Databases
  • User authentication
  • Ajax and RESTful APIs
  • Administration pages
  • Hosting

I'm also interested in having some information on Web Sockets in the book, but haven't found a way to fit it with the rest yet. If it ends up not making the cut this will be material that will appear here in my blog.

I'm sure you now want to know when the book will be available. Since I'm working with a publishing house the schedule is not entirely up to me. I still have a lot of writing to do, but assuming things go as I have planned the book should be available both in print and as en e-book in Q1 of 2014. I believe the folks at O'Reilly Media are likely to make an early release available online for people to review and provide feedback, so I'll let you know when and if that happens.

If you want to stay informed about the developments around this book I invite you to visit http://flaskbook.com, the book's official website. There isn't much right now, but you can subscribe to receive notifications (this site is owned and operated by myself).

Alternatively you can connect with me in the usual ways:

These are exciting times for the Flask community. If the rumors I'm hearing are correct I expect in the following months you will have not one but several books to choose from!



  • #1 Bambam said :

    this is great news. I found your site not too long ago. I have been experimenting with a few python frameworks. I have a comment on your Mega Tutorial, I got lost in the "Followers, Contacts And Friends" and do we really need the testing?. Just two topics to consider expanding or perhaps making it easier for the reader to follow in your upcoming book. Anyways, I look forward to this new book and it would be nice if some sort of shopping cart examples were presented. Just my two cents. Thanks

  • #2 Miguel Grinberg said :

    @Bambam: regarding the "do we really need the testing?" yes, unit testing ensures that existing functionality in your application does not break when you make additions or modifications. When something does break you want your own tests to catch the problem and not your users.

  • #3 Michael Le said :

    AWESOME! You're mega tutorial helped me understand Flask and WebDev better. I'm excited about the new book, and congrats Miguel!

  • #4 Satish Viswanathan said :

    This is real great news. I am eagerly looking forward to this book. Flask is an awesome framework and you, Sir, are an awesome writer. The combination would be lovely something to really look forward to.

  • #5 execute said :

    I recommend you also include a chapter/section for Alembic to keep track of various database models. In addition, perhaps you can also talk about web hosts and how to get wsgi hosted python hosts like WebFaction, Heroku etc somewhere. The reason being: PHP's rise in popularity was mostly due to ease of deployment and hosting. Part of Flask/Python problem is database revision management and web hosting. I can't begin to describe the amount of web-host problems I ran into with python.

  • #6 Miguel Grinberg said :

    @execute: Yes. Alembic is the migration tool of choice for the book. Hosting will also be covered, both traditionally and in the cloud. Note that there is some of that in the Mega-Tutorial as well, in particular I showed how to host on Heroku. The book will have the streaming solution simplified though, I have learned a few new tricks :)

  • #7 Mauricio de Abreu Antunes said :

    Great news, Miguel.

  • #8 Steven Elliott said :

    #Awesome! If you're looking for early reviewers I'd love to help out!

  • #9 Hari said :

    Really Great , I look forward to read the book.

  • #10 Steven Elliott said :

    For the web sockets bit, would you be looking into Tornado or something else completely different?

Leave a Comment

Note: all comments are screened before they are published. Thank you for your patience!