Learning Path: Python Web Development
2.5 (3 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.
45 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Learning Path: Python Web Development to your Wishlist.

Add to Wishlist

Learning Path: Python Web Development

Learn how to create scalable and powerful web applications by using the robust frameworks such as Flask and Django!
2.5 (3 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.
45 students enrolled
Created by Packt Publishing
Last updated 2/2017
Curiosity Sale
Current price: $10 Original price: $200 Discount: 95% off
30-Day Money-Back Guarantee
  • 8 hours on-demand video
  • 1 Supplemental Resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Understand the fundamental capabilities of the Flask framework
  • Build a real-world application that adheres to best practices using Flask
  • Ensure that the app is robust by performing various tests on it and then deploy it
  • Make the app robust by performing various tests on it
  • Explore Django’s automated admin interface to manage your app’s content
  • Create and use your own custom middleware for a Django app
  • Delve into advance database modeling to build a custom database field for your Django application
View Curriculum
  • A basic knowledge of Python
  • A computer with Python installed on it
  • Internet connectivity

Are you new to Python and are yet to explore all that it can do? Yes, Python has more to it than just data science and application programming. With the help of frameworks like Flask and Django, it can also build scalable web applications. The following are some popular web applications that are majorly written using Python or Django:

  • Pinterest

  • Instagram

  • Prezi

Python has two powerful frameworks: Flask and Django. The question is which framework should we choose? A common route is to begin building small, interesting projects with a simple framework, like Flask, and move on to Django as you begin to grasp the basics.

This Learning Path is designed to mold you to a complete Python web developer.

Yes, this is not a course; it is a Learning Path.

What this essentially means is that it contains multiple video courses that are logically tied together to provide you with a larger learning curve.  

Let’s dig into what this Learning Path does. Since you already know the basics of Python, you are no stranger to the fact it is an immensely powerful language. With the basics in place, this Learning Path takes a hands-on approach and demonstrates how to build fully functional real-time applications from scratch. The Learning Path begins with building interesting projects with Flask, gradually introduces the more challenging framework—Django—and then moves on to the complex concepts in it. It covers concepts such as how to build up and structure an effective web API that can be used by any client application accessing it over the HTTP protocol, and how to use the Flask and Django ecosystem efficiently to create web applications.  

So after completing this Learning Path, you should be able to create web applications as good as any of the popular applications mentioned above. Yay!

About the author:

For this Learning Path, we have combined the best works of five extremely esteemed authors: Gergo Bogdan, Alexander Putilin, Jack Stouffer, Matthew Nuzum, and Kevin Veroneau.  

Gergo Bogdan is a software engineer with over 8 years of experience in the IT industry. He has vast expertise in multiple technologies, including .NET to Python, JavaScript, and Java.

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 specializing in Internet-related services and products. He has also worked in the Search Engine department.

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.

Matthew Nuzum has been developing web applications since 1999 and has worked for several start-ups including Canonical, the makers of Ubuntu, as well as Fortune 500 companies. He has a passion for helping others learn new technologies and has written numerous tutorials and help documents as well as running a web-focused user group based in his hometown.

Kevin Veroneau is a very active Python and Django developer who has worked for many start-ups, has an active Python blog, and has worked on a magnitude of Python projects over the years.

Who is the target audience?
  • The Learning Path is aimed at Python developers who are interested in building web applications. But if you are here to learn how to build powerful web applications like the popular ones mentioned previously but are clueless of what Python is, do not worry as Python is one of the simplest languages to learn.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
104 Lectures
Web API Development with Flask
25 Lectures 01:39:58

This video will provide an overview of the entire course.

Preview 02:41

The aim of this video is to present how to create a Flask development environment, how to install Flask, how to create a simple web API, and how to run the project.

Setting Up Flask and Creating Your First Flask Application

In order to create a nicely usable and developer-friendly web API, we need to be able to define separate access paths for the assets that we want to manage through the web API. These paths can be configured by defining custom routing inside Flask.

Custom Routing Configuration

The goal of this video is to give an overview of Flask's template support.

Flask Template Usage

In this video, we will review how to send messages from the server-side to templates (flash messages) and how to define and map custom error pages.

Flask Flash Messages and Custom Error Pages

The purpose of this video is to present the basic concepts behind CRUD operations and the REST software architecture style.

CRUD and REST Basics

The purpose of this video is to present SQLAlchemy, Python’s well-known ORM package, present the new data model for our project and present how to use SQLAlchemy in Python with the MySQL database engine.

Using SQLAlchemy for Model Mapping

This video aims at presenting how to implement the Create operation (from CRUD) using Flask and SQLAlchemy, and how to apply best practices to Create.

Implementing Create

The aim of this video is to present how to implement the Read operation from CRUD using SQLAlchemy and Flask.

Implementing Read

In this video, we aim to cover how to implement the Update operation from CRUD using Flask and SQLAlchemy as a RESTful API.

Implementing Update

In this video, we are going to cover how to implement the Delete CRUD operation using Flaks and SQLAlchemy.

Implementing Delete

In this video, we are going to take a look at an advanced topic of REST, Hypermedia, and HATEOAS; these decouple the client and server application architecture.


In this video, we are going to cover why it is useful to have paginated data.

Implementing Pagination

In this video, we are going to cover how to implement authentication in RESTful APIs.

RESTful Authentication

In this video, we are going to take a look at how to improve the response time of your API by applying different types of caching.

HTTP Caching

In this video, we will review the best practices for handling errors within our restful API.

Error Handling in RESTful APIs

The aim of this video is to cover the design guidelines that should be taken into account when building large applications/APIs using Flask.

Guidelines for Building Large Projects

The aim of this video is to present why HTTPS should be used for APIs.

Why Use HTTPS?

The aim of this video is to present how Token Authentication can be implemented using Flaks.

Token Authentication

The aim of this video is to present how to manage cookies in a Flask application.

Usage of Cookies

The aim of this video is to present how passwords should be stored within a web application.

Storing Passwords

The aim of this video is to present the Flask test client and how can it be used for application testing.

Using the Flask Test Client

The aim of this video is to present how we can test different routes using the Flask Test Client.

Testing Custom Flask Routes

The aim of the video is to present how to use the Flask Test Client for testing CRUD operations.

Testing CRUD

The aim of this video is to present how an authentication layer of our Flask application can be tested using Flask Test Client.

Testing Authentication
Mastering Flask
37 Lectures 04:14:28

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

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

Connecting to and querying databases can be verbose

Connecting to the Database

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

Creating Models

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

Accessing Data

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

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

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

Advanced Queries

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

Loops and Control Structures

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

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

Creating Flask Blueprints

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

Restructuring Our Files

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

Installing and Configuring Flask-Login

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

Handling Passwords with Flask Login

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

Creating Login and Registration Pages

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

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

What Is REST?

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

Using Flask-RESTful

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.

Setting Up

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

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

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

Flask Debug Toolbar

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

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

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

Installing and Understanding Celery

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

Writing Tasks in Celery

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 Celeryl

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.

What Is Unit Testing?

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

Testing Our Models

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

Testing URLs

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

Our app needs a way to recreate a virtual environment on a remote machine. It also needs a way to upgrade packages.

Preparing Dependencies for Deploying

We need to figure out how to deploy our app to a VPS

Using a Simple VPS

We need a way to figure out how to deploy our app to AWS.

Using Amazon Web Services

We need a way to figure out how to deploy our app to Heroku.

Using Heroku

Our app may need potential improvements. These improvements are up to learners to implement. We also should mention some practices that we haven't focused on in the series.

Where Do I Go from Here?
Learning Django Web Development
20 Lectures 01:05:47

Learn about the benefits of Django and how it helps developers work more efficiently.

Preview 02:48

To begin using Django for development, you need to install the tools required. Learn the best way to install Django and then create your first project.

Installing Django and Creating Our Project

Django makes it easy to reuse your code by separating it into apps. In fact, many features we'll use in this series are separate apps that we'll include in our project.

Understanding Apps

A model is a simple description of the data you want to store. Some projects may need nothing more than a model.

Creating Our Models

The admin interface allows you to manage users, groups, and all the data stored in your database.

Using the Built-in Admin Interface

Views allow you to create web pages for your application. These pages can be plain HTML or can load data from your database.

What Are Views?

Templates in Django can be standard HTML, XML, or plain text. This makes them simple to use for developers and designers.

Using Django Templates

Many of the web pages follow a common pattern: show simple HTML, show a list of records in the database, or show details about one record. Django's generic views simplify these common tasks.

Generic Display Views

Many of the web pages in your app share common components. We can use template inheritance to move these common pieces into a separate file in order to avoid repeating ourselves.

Template Inheritance and Parent Templates

Django includes a simple but customizable authentication system that makes it easy to drop in a user database to your app.

The User’s Model

It's quite common that your database structure will change over time. Django makes this easy with database migrations.

Changing Our Models

Nearly every application that has users needs to add custom fields to the user profile. Django provides tools to make this easy.

Creating a Custom Profile

Some apps simply need to show user information from the database, but it's quite common to give users a way to add and change data. Django provides generic views for this very purpose.

Generic Form Views

The Django Debug Toolbar is an add-on app created by the Django community, which helps to look at what your web app is doing behind the scenes.

Enabling the Django Debug Toolbar

Django optimizes itself to do lazy loading, where data is loaded only when it's needed. In some common scenarios, this actually hurts performance. There is an easy solution though.

Understanding Related Data

Generic Views can be subclassed and customized to enhance functionality. We'll use this capability to improve performance.

Customizing Our Home Page View's Query

The Python community has created a standard called WSGI to deploy Python apps to the Web. It is compatible with many different kinds of servers.

Introducing WSGI

Preparing our application for the Web involves a few simple steps in order to make it suitable for use in production.

Understanding Deployment

In this example, we'll use Apache, uWSGI, and Django on an Ubuntu server. This stack is well supported and easy to use.

Deploying Our Application

We've covered a lot of ground in a short time, which is possible because Django includes many time-saving capabilities.

Wrapping Up
Mastering Django Web Development
22 Lectures 57:34

This video will provide an overview of the course.

Preview 02:27

Generic class-based views provide a lot of functionality. Let's take a look at how you can easily extend them to create your own custom solutions.

Extending Class-based Views

The built–in, generic class-based views are actually made up of many reusable mixins. Take a look at how you can use the same technique to add your own behaviors into your class-based views.

Using Mixins

You don't have to use generic class-based views. If you plan to override much of the built-in behavior or just don't need it, then you can start out with a simpler class, such as view.

Custom Class-based Views

You can create a single class-based view that can handle all of the operations for a set of data. These are sometimes called switchboard classes, and they can help make your code easier to maintain.

Creating a Switchboard View

Code that is used in many views can be moved into middleware, allowing it to operate either before or after your view code is executed.

What Is Middleware?

Middleware classes are not fancy; they simply have one or more methods that correspond to one of the five predefined hooks available. Let's take a closer look at them here.

Creating a Custom Middleware

Showing users exceptions is unprofessional and may be a security problem. Let's examine an easier way to create middleware that catches and responds to unhandled exceptions.

Exception Handling Middleware

In this video we will explore the possibility of creating custom filters to make frequently used behaviors easily reusable for everyone on our team.

Creating Template Filters

If you need a functionality that is too sophisticated for a filter, it should be a template tag. These are of several kinds, such as simple_tag for basic functionality and a template inclusion tag to bring in entire templates.

Creating Custom Template Tags

With the growing popularity of Angular.js and similar tools, more applications need to provide a RESTful API. Tastypie is a Python module that does most of the work for us. Let's check it out.

Using Tastypie to Create a REST API

Sometimes you want to modify the data before it goes out to the API. Tastypie makes it easy to add or customize the data returned from the API.

Complex Queries with Our API

Not all applications work with a read-only API. Sometimes, you want full CRUD support from your API. You need to add an authentication step before you make this functionality available. Fortunately, Tastypie does all of this for us.

Authentication and CRUD Support

Sometimes, you want to combine data from different models. It's not hard to do this with Python, but generic relationships allow Django to do this for you.

Generic Relationships

Have you wished you could add or edit many records to the database at once? With only a few lines of code, you can add this capability to your application.

Formsets for Data Management

Django's ORM works fine when your filters are combined using the AND operator. If you want to perform more complicated queries, you should use the Q function, which just gives you more flexibility with your logic.

Advanced Queries with Q()

Is your application running slow? You may be performing expensive operations more often than necessary. We can use low-level caching operations to have tight control over our application's performance.

Low-level Caching

Do you have data that is accessed on many views? We already know we can create middleware to reduce duplication, but why not add caching at to middleware to also speed up performance?

Caching with Middleware

If your cache needs are simpler, you can perform caching at the template level. This can provide a tremendous improvement in performance and is easy to use.

Using the Template Cache

Do you frequently perform the same query and filter operation in multiple views? Avoid duplication using model managers.

Model Managers

You may have a similar logic in multiple areas of the site to deal with inserting data. You can create a manager function that accepts your data as a parameter and centralizes your insertion logic.

Using a Model Manager to Create New Objects

Do you perform regular maintenance on your application? You can simplify periodic cron tasks by creating custom manage.py commands.

Creating manage.py Commands
About the Instructor
Packt Publishing
3.9 Average rating
7,349 Reviews
52,621 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.