Flask Web Development: Developing Web Applications with Flask
316 pages
English
PDF
4.5

Flask Web Development: Developing Web Applications with Flask

Flask Web Development: Developing Web Applications with Flask

Author:

Year:

Summary:

Introduction

The book "Flask Web Development" by Miguel Grinberg is one of the most authoritative and comprehensive guides to building web applications using the Flask microframework in Python. Published in 2018 (second edition), the book covers both basics and advanced topics, including working with databases, authentication, testing, deployment, and much more. Over 316 pages, the author consistently guides the reader from installing Flask to creating a full-fledged, production-ready application — a social blog. This is not just a reference book, but a practical guide built around a real project.

What the book is about

The book is structured around developing one end-to-end example — a blogging application with user registration, writing posts, subscribing to other authors, and moderation. Each chapter adds new functionality, gradually increasing the code complexity. Main topics:

  • Installing and configuring Flask, creating a project structure.
  • Jinja2 templates and working with forms (Flask-WTF).
  • Databases: SQLAlchemy, migrations (Flask-Migrate), table relationships.
  • Authentication system: registration, login, session management, password hashing.
  • User profiles, avatars (Gravatar), roles and permissions.
  • Markdown support for formatting post text.
  • Pagination, full-text search.
  • RESTful API using Flask.
  • Testing (unittest, pytest) and debugging.
  • Deployment on various platforms: Heroku, Docker, traditional VPS.
  • Working with email (Flask-Mail), asynchronous tasks (Celery).

Who this book is for

The book is aimed at Python developers already familiar with the basics of the language, but without experience in web development or working with Flask. It will also be useful for those transitioning from other frameworks (Django, Pyramid) who want to quickly master the lightweight and flexible Flask. Python beginners may need to study basic concepts (functions, classes, modules) beforehand.

What the reader will learn

After reading the book and completing all the examples, the reader will be able to:

  • Create web applications of any complexity using Flask.
  • Design project structure, separate code into modules (blueprints).
  • Work with databases via the SQLAlchemy ORM, perform migrations.
  • Implement full-fledged authentication and user management.
  • Write REST APIs and integrate them with the frontend.
  • Cover code with tests and debug applications.
  • Deploy applications to the cloud and on your own server.
  • Use Flask extensions to solve common tasks.

Strengths

  • Practical focus: the book teaches through a real project, not abstract examples.
  • Relevance: the second edition (2018) covers modern versions of Flask, Python 3, and new tools (Docker, pytest).
  • Depth: the author not only shows "how" but also explains "why," paying attention to architectural decisions.
  • Clear structure: each chapter logically follows from the previous one, code gradually becomes more complex.
  • Additional materials: the full source code of the examples is available on GitHub, along with updates for new library versions.
  • Author's authority: Miguel Grinberg is the creator of a popular Flask course, author of many articles and videos; his writing style is clear and friendly.

Who it is recommended for

The book will be useful for:

  • Beginner Python web developers wanting to learn Flask.
  • Experienced developers transitioning to Flask from other technologies.
  • Students and instructors of web development courses.
  • Anyone who wants to learn how to create modern, scalable web applications.

Recommendations