An Introduction to Flask
This repository contains the software that accompanies my O'Reilly training video An Introduction to Flask.
Instructions on how to use these examples is included in the appropriate segments of the class.
If you want to have an idea of the contents of this class, below is a list of the projects included in this repository.
- 1a: Hello, World, Flask version.
- 1b: Dynamic routes.
- 2a: Templates, and the
- 2b: Rendering lists of elements in templates.
- 2c: Rendering data structures.
- 2d: Using template variables and conditionals.
- 2e: Using template macros.
- 2f: Implementing templates with Twitter Bootstrap and the Flask-Bootstrap extension.
- 2g: Custom error pages, and template inheritance.
- 2h: Page links with the
- 3a: Introduction to web forms and Flask's
- 3b: Managing forms with the Flask-WTF extension.
- 3c: Rendering Bootstrap forms with Flask-Bootstrap.
- 3d: File uploads.
- 4a: Using Flask's
- 4b: Request hooks, and the
- 4c: Example of many ways to create responses to requests.
- 5a: Introduction to relational databases and the Flask-SQLAlchemy extension.
- 6a: Password hashing.
- 6b: Logging users in and out with the Flask-Login extension.
- 7a: Refactoring of the single script 6b application as a scalable project structure.
- 8a: Unit tests.
- 8b: Testing routes using the Flask test client.
- 8c: Additional tests based on coverage reports.
- 9a: Production mode change to send emails to administrators when a crash occurs.
- 9b: Example application to deploy to Heroku.
- 9c: Example application to deploy to a Linux server.