Welcome

Step-by-Step Introduction to the [Flask] Web Framework

created by Anthropic’s AI Claude at the request of Serge Tahé - September 2026


This document is a translation of the original French version, generated using an automated tool. Some expressions or technical terms may not fully reflect the original meaning.

This course shows, step by step, how to build an MVC web application with Flask 3.1 and Python. The HTML pages are generated by the server with Jinja2 views, with no JavaScript framework in the browser.

It has two parts. First come 28 small examples, each focused on a single concept: the structure of a Flask application, routing, responses and redirects; binding and validating parameters with Pydantic; Jinja2 views, layouts and WTForms forms, with the Post / Redirect / Get pattern and CSRF protection; internationalization; data scopes; the request life cycle; JWT authentication, roles and captcha; and finally a three-layer architecture with SQLAlchemy and MySQL.

Then comes a complete case study, RdvMedecins: an appointment-booking application for a medical practice, with three roles (administrator, doctors, patients), available in French and English, in which every file is commented.

Prerequisites: the basics of web programming (HTTP, HTML) and of the Python language (functions, classes, dictionaries, modules). Installing the tools (Python, Visual Studio Code, MySQL, curl) is covered in the appendices.

This course follows, example by example, the same progression as the Spring MVC, ASP.NET Core MVC and NestJS courses in the same series, so the frameworks can be compared, but it can be read on its own.

All courses by Serge Tahé