Grey Li's Blog

My New Flask Book is Published!

After five years of writing (and procrastinating), my new book Flask: From Beginner to Advanced has finally been published! As a fully updated edition of Flask Web Development in Practice, this new version includes extensive revisions and updates to better align with the modern technology stack.

At this point, my journey along the “Flask” branch of my life feels complete. I started learning Python and Flask on my own during my sophomore year of college, began writing Flask Web Development in Practice before graduation, and became a Flask maintainer around the time the book was published. Since then, I have contributed code to many related projects.

From its first publication in 2018 until now, the book has been reprinted 14 times and sold over 20,000 copies (including e-books). It has received a great deal of positive feedback, maintaining an average rating of around 9/10 on Douban.

Douban rating screenshot

I have now finally completed the new edition, and I was honored to receive a recommendation from Armin Ronacher, the creator of Flask:

Great resources make great developers, and it’s wonderful to see Flask supported by such high-quality education materials.

Thank you to everyone who has followed this book and kept urging me to update it! This book is the result of our collective effort :D

New Flask book

Key Features of the Book

The book comes with a new title, for a slightly amusing reason. The title has changed from Flask Web Development in Practice: Beginner, Advanced, and Principles to Flask: From Beginner to Advanced — Engineering Practices for Python Web Development.

The new subtitle better summarizes the book’s core idea: using Flask web development as the main thread, this book helps you master a relatively complete set of Python web engineering practices. Topics range from HTTP fundamentals to database ORMs, from unit testing and code style to performance optimization, from traditional web application development to Web API development, and finally to various deployment strategies. For readers who want to dive deeper, the final chapter provides a source code analysis of the framework itself.

The book also uses two example applications to connect different concepts, demonstrating Flask project organization patterns, practical tips, and the implementation of common features.

Visit the book’s homepage for a detailed introduction and table of contents: https://helloflask.com/book/4/

Major Changes in the New Edition

Below are some of the key updates.

Version Upgrades

Old Version New Version
Flask 1.x Flask 3.x
Python 2.7, 3.6+ Python 3.9+
Bootstrap 4.x Bootstrap 5.x
SQLAlchemy 1.x SQLAlchemy 2.x

Technology Stack Updates

Old Stack New Stack
Pipenv PDM
Flask-Mail Flask-Mailman
Flake8 Ruff
Open Iconic Bootstrap Icons
Flask-Moment + Moment.js Day.js
jQuery Vanilla JavaScript
AJAX with jQuery Fetch API
Flask for Web APIs APIFlask
Cloud platform deployment Docker deployment

The example applications have also been significantly reworked. The old examples — SayHello, Todoism, and CatChat — have been removed. Two applications were retained and heavily refactored:

Old Version New Version
Bluelog Greybook
Albumy Moments
helloflask/demos helloflask/examples

Originally, the plan was to reduce the book from about 700 pages to around 500 pages, since a very thick book can feel intimidating. Although two chapters were removed, by the time writing was finished the page count had crept back close to 700 pages. In fact, the new edition is slightly thicker than the old one — apparently I added more content without even realizing it.

Target Audience

This book is intended for:

This book does not cover Python fundamentals, so readers should already have a basic understanding of Python syntax. Web development also inevitably involves HTML, CSS, and JavaScript. If you are not familiar with these, you can follow the introductory tutorials provided by MDN: https://developer.mozilla.org/docs/Learn. A basic understanding is sufficient.

Endorsements

Great resources make great developers, and it’s wonderful to see Flask supported by such high-quality education materials.
Armin Ronacher (Creator of Flask, VP of Engineering at Sentry)

As a software engineer passionate about Python, and an advocate who enjoys helping others and giving back to the community, Grey’s relentless pursuit of technical accuracy and an excellent reading experience is evident throughout this new work. I believe every reader will feel his sincerity between the lines.
— Guan Jun (Translator of The DevOps Handbook, Second Edition, DevOps Architect at Dell Technologies)

This book is rich in content and highly recommended for anyone who wants to systematically learn Flask. Don’t miss the small but valuable tips scattered throughout the book.
Hsiaoming Yang (Founder of Typlog, Author of Authlib)

About the Author

I am Grey Li, a maintainer of Flask and APIFlask, a member of the Flask development team (Pallets Team), the founder of the HelloFlask community and the CodeKitchen community, and a Microsoft Most Valuable Professional (MVP) in Python. I currently work at Dell Technologies as a Principal Software Engineer.

I am passionate about the use and promotion of open-source software and have contributed a significant amount of code to projects such as Flask. I have also spoken at conferences including PyCon China, PyCon US, COSCUP, COSCon, and CommunityOverCode. You can find my open-source projects on GitHub.

If you would like to learn more about my new work or other updates, feel free to follow me on Twitter, subscribe to my WeChat Official Account, or join my mailing list.

Errata, Sharing, and Reviews

If you find any formatting or content errors while reading, you are welcome to submit errata through the following channels. I will correct them in future reprints. Thank you for your feedback!

If you find this book helpful, feel free to share it on social media or recommend it to your colleagues and friends. You are also welcome to leave a rating or review on the book’s Douban page.

Published at Nov 23, 2025 , Edit on GitHub