Mastering Flask
2.7 (5 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
48 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Mastering Flask to your Wishlist.

Add to Wishlist

Mastering Flask

Leverage the small but powerfully-formed Flask framework and its extensibility
2.7 (5 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
48 students enrolled
Created by Packt Publishing
Last updated 4/2017
English
Curiosity Sale
Current price: $10 Original price: $95 Discount: 89% off
30-Day Money-Back Guarantee
Includes:
  • 4.5 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I 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
View Curriculum
Requirements
  • This fast-paced, example-based video course starts with an advanced overview of Flask core concepts, moves on to advanced functionality, and finishes up with a running application that can serve as a blueprint for further studying or production development.
Description

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.

About The Author

Alexander Putilin is a professional programmer and has several years of experience in languages such as Python and C++. He has worked for a lot of years in Yandex, a Russian multinational technology company specializing in Internet-related services and products. He worked in the Search Engine department on various parts of Yandex's search engine.

Jack Stouffer is a programmer who has several years of experience in designing web applications. He switched to Flask three years ago for all his projects. He currently works for Apollo America in Auburn Hills, Michigan, and writes internal business tools and software using Python, Flask, and JavaScript. Jack is a believer and supporter of open source technology.

When he released his Flask examples with the recommended best practices on GitHub, it became one of the most popular Flask repositories on the site. Jack has also worked as a reviewer for Flask Framework Cookbook, Packt Publishing.

Who is the target audience?
  • This course is for Python web developers who have developed web applications with Flask and are well-versed in its core functionality.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
37 Lectures
04:18:41
+
An Advanced Introduction to Flask
3 Lectures 13:15

The viewer needs to have a clear picture of where this course is going to take them. 

Preview 04:16

The course assumes an understanding and familiarity of Flask's API, but we still need a basic application to build off. 

A High-level Reintroduction into Flask
06:24

Python libraries are installed globally, so we need a way to isolate our project's libraries so that they do not conflict with each other. 

Dependency Isolation with virtualenv
02:35
+
Accessing the Database
6 Lectures 36:01

Connecting to and querying databases can be verbose 

Preview 03:09

We have a universal connection. But now we need to create an API to make the queries. 

Creating Models
03:08

We have a universal connection and have set up a universal query interface. Let's start reading data. 

Accessing Data
07:02

Data is rarely isolated. We need a way to match the records of relationship A to the records of relationship B in such a way that a record in relationship A can link to multiple records in relationship B, but a record in B is linked to only one record in A. 

Creating and Querying One-to-Many Relationships
06:28

We need a way to match relationship A and relationship B in such a way that a record in relationship A can link to multiple records in relationship B and vice versa. 

Creating and Querying Many-to-Many Relationships
08:41

How can SQLAlchemy represent the more complex queries that can be created in SQL?

Advanced Queries
07:33
+
Advanced View Usage
2 Lectures 18:02

Jinja provides an easy way to replace values in an HTML document, but to structure dynamic pages, our Jinja templates need control logic. 

Preview 11:28

Creating secure forms that cover all of the validation issues in web forms involves a lot of boilerplate code. 

Creating and Validating Forms with WTForms
06:34
+
Restructuring an App with Blueprints
2 Lectures 15:17

Many of our routes contain common attributes. We need an easy way to share this attributes between them. 

Preview 05:11

Our app is getting larger. We need a way to split our app.py file into multiple files. 

Restructuring Our Files
10:06
+
Securing the App
4 Lectures 26:34

Our site is fully functional, but we can't have any user-added content, such as comments, without a user system. 

Preview 04:15

In this video, we're going to cover how to handle encrypted passwords. 

Handling Passwords with Flask Login
04:13

In this video, we're going to make our new login system accessible to users from the frontend. 

Creating Login and Registration Pages
08:02

In this video, we are going to add functionality to our app that allows us define where each user can and cannot go. 

Adding User Permissions
10:04
+
Creating a REST API
2 Lectures 22:53

The aim of this video is to cover a basic overview of RESTful APIs. 

Preview 07:25

In this video we're going to create REST API using Flask-RESTful. 

Using Flask-RESTful
15:28
+
Creating an Admin Interface
3 Lectures 17:09

Our app needs a way for maintainers of the site to edit and administer the site from the Web. We will provide this functionality with Flask Admin. 

Preview 04:38

The only way to create new data in the database currently is to use the shell interface. We need an administrator interface to add data from the Web. 

Interfacing with Models
07:36

Currently, in all the places where movie posters or actor pictures should be, there are placeholder images. Let's fix that with Flask Admin. 

File Storage and Retrieval
04:55
+
Extending Our App
3 Lectures 17:00

When developing the app, we don't have a way of viewing the internals of Flask without a lot of print statements. 

Preview 04:30

Currently, our app renders a template every time a page is loaded, even though the data on the page doesn't change that often. 

Flask Cache
03:51

One easy way to speed up page load times is to concatenate our CSS and JS files in one file each. But this process can be tedious to do manually. 

Flask Assets
08:39
+
Asynchronous Programming with Celery
3 Lectures 20:33

Some functions or features in our application are too slow to run in the same process as our Flask server. 

Preview 07:00

Now that Celery is set up, we need to understand how to send it commands. 

Writing Tasks in Celery
04:49

Now that we understand how Celery works and how to give it a task, we will apply this knowledge for something practical. 

Periodic Tasks in Celery
08:44
+
Testing Our App
4 Lectures 16:42

Our application has a lot of code in it now; we need to make sure that our code isn't buggy without manually testing every change. 

Preview 05:53

Now that we understand how unit tests work, let's build some tests for our SQLAlchemy models. 

Testing Our Models
03:58

We now understand how to use the unittest library; next, we need to understand Python's test client. 

Testing URLs
04:08

Now that we are testing a lot of our application, we need a way to easily know what parts of our application are not being tested. 

Testing Code Coverage
02:43
1 More Section
About the Instructor
Packt Publishing
3.9 Average rating
7,349 Reviews
52,552 Students
616 Courses
Tech Knowledge in Motion

Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.

With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.

From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.

Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.