Mastering Flask

Mastering Flask

English | 2016 | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 4h 14m | 0.98 GB

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

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.

What You Will Learn

  • Build a real-world application that adheres to best practices using Flask
  • Use Virtualenv to incorporate dependency isolation
  • Work with SQLAlchemy while learning database concepts
  • See how to customize Jinja templates to work with dynamic pages
  • Create secure forms using WTForms
  • Modularize your code with Blueprints
  • Work with Flask Login and Flask Principal to secure our app
  • Add a REST API to our app to allow programmers to easily build off the platform the app is building
  • Create an administrator interface using Flask Admin
  • Speed up the working of the app with Flask Debug Toolbar, Flask Cache, and Flask Assets
  • Implement asynchronous programming using Celery
  • Make the app robust by performing various tests on it
  • Deploy the app to platforms such as AWS, Heroku, and simple VPS with Nginx and Gunicorn
Table of Contents

An Advanced Introduction to Flask
01. The Course Overview
02. A High-level Reintroduction into Flask
03. Dependency Isolation with virtualenv

Accessing the Database
04. Connecting to the Database
05. Creating Models
06. Accessing Data
07. Creating and Querying One-to-Many Relationships
08. Creating and Querying Many-to-Many Relationships
09. Advanced Queries

Advanced View Usage
10. Loops and Control Structures
11. Creating and Validating Forms with WTForms

Restructuring an App with Blueprints
12. Creating Flask Blueprints
13. Restructuring Our Files

Securing the App
14. Installing and Configuring Flask-Login
15. Handling Passwords with Flask Login
16. Creating Login and Registration Pages
17. Adding User Permissions

Creating a REST API
18. What Is REST?
19. Using Flask-RESTful

Creating an Admin Interface
20. Setting Up
21. Interfacing with Models
22. File Storage and Retrieval

Extending Our App
23. Flask Debug Toolbar
24. Flask Cache
25. Flask Assets

Asynchronous Programming with Celery
26. Installing and Understanding Celery
27. Writing Tasks in Celery
28. Periodic Tasks in Celery

Testing Our App
29. What Is Unit Testing?
30. Testing Our Models
31. Testing URLs
32. Testing Code Coverage

Deploying Our App
33. Preparing Dependencies for Deploying
34. Using a Simple VPS
35. Using Amazon Web Services
36. Using Heroku
37. Where Do I Go from Here