You are previewing Mastering Flask.
O'Reilly logo
Mastering Flask

Video Description

Leverage the small but powerfully-formed Flask framework and its extensibility

About This Video

  • Get an in-depth look at the Python web micro-framework

  • Take advantage of Flask’s extensibility to perform advanced web application development

  • Develop a real-world application using best practices to reduce its development and maintenance time

  • In Detail

    Flask is a small and powerful web development framework for Python. It is called a micro-framework as it aims to keep the core simple but extensible. Even though it’s called a micro-framework, it is no way lacking in functionality, and allows you to develop applications very quickly, primarily through the development of a small codebase.

    This course will take you deep into the world of using Flask and its ecosystem of extensions to create web applications. We’ll walk through creating a simple IMDB clone from scratch. We’ll start by creating the boilerplate code and use Virtualenv to create an isolated development environment. You’ll then learn to work with the database using SQLAlchemy. After that, we’ll display our data to the end user using WTForms.

    We’ll restructure and modularize our code using Blueprints. Our site will be secured using the extensions Flask-Login and Flask-Principal. After that, we’ll create a RESTful API of our app. We’ll then give admin functionality and extend our app using various flask extensions. We’ll incorporate Celery to make our tasks asynchronous. We’ll walk you through performing unit test of our app, and then test our SQLAlchemy models. We’ll also test the URLs and finally, we’ll test how much of our code isn’t being tested. All these tests will make our app secure. Finally, we’ll deploy our Flask app to various options that are available.

    This course will give you an in-depth understanding of how to use Flask and its strong extensibility for more complex web applications.

    Table of Contents

    1. Chapter 1 : An Advanced Introduction to Flask
      1. The Course Overview 00:04:16
      2. A High-level Reintroduction into Flask 00:06:25
      3. Dependency Isolation with virtualenv 00:02:35
    2. Chapter 2 : Accessing the Database
      1. Connecting to the Database 00:03:10
      2. Creating Models 00:03:08
      3. Accessing Data 00:07:02
      4. Creating and Querying One-to-Many Relationships 00:06:28
      5. Creating and Querying Many-to-Many Relationships 00:08:41
      6. Advanced Queries 00:07:33
    3. Chapter 3 : Advanced View Usage
      1. Loops and Control Structures 00:11:28
      2. Creating and Validating Forms with WTForms 00:06:34
    4. Chapter 4 : Restructuring an App with Blueprints
      1. Creating Flask Blueprints 00:05:11
      2. Restructuring Our Files 00:10:06
    5. Chapter 5 : Securing the App
      1. Installing and Configuring Flask-Login 00:04:16
      2. Handling Passwords with Flask Login 00:04:13
      3. Creating Login and Registration Pages 00:08:02
      4. Adding User Permissions 00:10:05
    6. Chapter 6 : Creating a REST API
      1. What Is REST? 00:07:25
      2. Using Flask-RESTful 00:15:29
    7. Chapter 7 : Creating an Admin Interface
      1. Setting Up 00:04:39
      2. Interfacing with Models 00:07:36
      3. File Storage and Retrieval 00:04:55
    8. Chapter 8 : Extending Our App
      1. Flask Debug Toolbar 00:04:30
      2. Flask Cache 00:03:52
      3. Flask Assets 00:08:40
    9. Chapter 9 : Asynchronous Programming with Celery
      1. Installing and Understanding Celery 00:07:00
      2. Writing Tasks in Celery 00:04:49
      3. Periodic Tasks in Celeryl 00:08:44
    10. Chapter 10 : Testing Our App
      1. What Is Unit Testing? 00:05:54
      2. Testing Our Models 00:03:58
      3. Testing URLs 00:04:08
      4. Testing Code Coverage 00:02:44
    11. Chapter 11 : Deploying Our App
      1. Preparing Dependencies for Deploying 00:06:50
      2. Using a Simple VPS 00:13:38
      3. Using Amazon Web Services 00:19:51
      4. Using Heroku 00:10:24
      5. Where Do I Go from Here? 00:04:34