Complete Python Web Course: Build 8 Python Web Apps
4.4 (1,118 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.
8,442 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Complete Python Web Course: Build 8 Python Web Apps to your Wishlist.

Add to Wishlist

Complete Python Web Course: Build 8 Python Web Apps

Build Python Web Applications from Beginner to Expert using Python and Flask
4.4 (1,118 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.
8,442 students enrolled
Created by Jose Salvatierra
Last updated 7/2017
English [Auto-generated]
Current price: $10 Original price: $110 Discount: 91% off
5 hours left at this price!
30-Day Money-Back Guarantee
  • 16 hours on-demand video
  • 9 Articles
  • 9 Supplemental Resources
  • 6 Coding exercises
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Design, develop, and deploy engaging web applications using Python and web languages
  • Understand the way the internet works from the point of view of all development areas
  • Develop applications that use MongoDB databases
View Curriculum
  • A computer; any will do!
  • No software required, we'll install everything as we go.
  • We will also install Python in the course! We can use either Python2.7 or Python3.5

Update 9 Jul 2017: added explanation videos for all coding exercises in the course.

Updated 17 Nov 2016: added live chat for questions, and interactive coding exercise to maximise your learning!

The Complete Python Web Developer Course will lead you down a path of understanding and skill that may well, with work and patience, result in an income boost or a career change.

It is a one-stop-shop covering everything you need to start having ideas and creating Python web applications that engage visitors and provide them with value. In addition, I’ll always be available to help you further your learning and explore more avenues for success.

What do you have to do?

You’ll have immediate access to 8 carefully designed sections, each teaching and guiding you into creating a web application using Python: your challenge. I’ve created thorough, extensive, but easy to follow content which you’ll easily understand and absorb.

I recommend taking your time, as software development doesn’t happen overnight. Each section should take approximately one week, including developing the weekly challenge, reading around the subject, and practising further.

  • The course starts with the basics, including Python fundamentals, programming, and user interaction.
  • Then we will move onto how the internet works, making web requests and parsing webpages to get data from them using Python.
  • Now that you’ll have all the knowledge required, we’ll introduce our database of choice, MongoDB, and then proceed into creating our first Python web application: a blog where users can register and publish posts.
  • Then we will create a fantastic Python web application to notify you when prices of items in online stores go down; a really useful web app!

During all this, we’ll be learning about deploying our Python web applications, making it performing so it can scale to thousands of users, and usability and security issues.

Over the entire course you will learn:

  • Python
  • HTML
  • CSS
  • Responsive Design with Bootstrap
  • JavaScript
  • jQuery
  • MongoDB
  • Linux (UNIX)
  • APIs (both creating them and interacting with them)
  • Deployments to Heroku and DigitalOcean

What else will you get?

  • A friendly community to support you at all times
  • Personal contact with me: I’m always available to answer questions and help out
  • Lifetime access to course materials, even as more are released (and they are, very often!)
  • Hands-on learning to ensure you’re absorbing everything
  • A true understanding of the concepts of software development, design, and operations

By the time you’re done with the course you’ll have a fantastic set of fundamentals and extensive knowledge of Python and web development, which will allow you to easily continue learning and developing more and more advanced and engaging web applications.

It doesn’t matter how old you are or what you do professionally. I guarantee that anyone can benefit from learning web development and Python, but especially web application development.

So what are you waiting for? Sign up now, and I’ll see you on the inside!

Who is the target audience?
  • This course is for beginners with a none to a small amount of development experience, or for intermediate developers wanting to learn about deployments and development with Python
  • This course is not intended for advanced programmers with a lot of experience
Students Who Viewed This Course Also Viewed
Curriculum For This Course
179 Lectures
Your Age in Seconds
20 Lectures 56:11

Download an e-book to go along the course, explaining the content covered by lectures with examples. For you to read at your own pace as well!

Get the course e-book!

In this video we have a quick look at what we are going to understand in this Section:

  • How to install Python and use IDLE.
  • What Variables, strings, and integers are.
  • What methods are and how we can create our own.
  • What the str(), int(), print(), format(), and input() methods do.
  • What if, elif, and else do.
Preview 02:07

This course comes with a live chat for discussions and Q&A. I am frequently available, so join us and get immediate feedback!

Join the live chat for discussions and Q&A

In this lecture we look at downloading and installing Python.

The version of Python used in this course is Python 3.4.3, which is the most recent at this time. If you are using a later minor version (e.g. 3.4.4 or higher), then you should encounter no problems at all. Python 3.5.0 is also absolutely fine. If you are using a later major version (e.g. 3.6.1 or higher), some things may change, but not substantially.

You may use Python 2.7 throughout the course for many things. Where possible, the differences between Python 3 and Python 2 will be highlighted in text below the lecture.

Remember the address to download Python from is

Preview 00:53

In this video we take a look at what integers and strings are.

Integers are just whole numbers (numbers without a decimal point).

Strings are collections of letters, numbers, and symbols; strings are also known as literals.

Preview 02:29

Let's quickly firm up our knowledge on integers and strings!

Integers and Strings Quiz
2 questions

In this lecture we take a look at creating variables in Python.

my_variable = 5
another_variable = "a string"
x = 153</span>

It really is that simple!

You can give variables any name you want as long as it is only letters, numbers, and underscores. Variables names may not start with a number. Also you may not use any of the Python keywords as a variable name.

For more information:

Variables in Python

Creating variables
1 question

The solution to the "Creating variables" Python coding exercise.

Solution to coding exercise: creating variables

In this lecture we take a look at printing to the screen and at converting between strings and integers, and vice-versa.

To print to the screen just use the print() method.

>>> print("hello, world!")
hello, world!
>>> print(5)

The str() method converts numbers to strings, and the int() method converts to integers.

>>> "5"
>>> int("5")
>>> str(5)
Preview 05:17

The print, str, and int methods
1 question

The solution to the "print, str, and int methods" Python coding exercise.

Solution to coding exercise: print, str, and int

In this lecture we take a look at how to format a string easily by replacing placeholders with values provided to the format() method.

>>> my_string = "this is a {} string"
>>> my_string.format("sample")
'this is a sample string'
>>> my_string.format("great")
'this is a great string'

We can also format multiple placeholders at once:

>>> "this is a {} {}".format("great", "number")
'this is a great number

And we can also format placeholders with names.

>>> "this is a {adjective} {noun}".format(adjective="great", noun="string")
'this is a great string'
>>> "this is a {adjective} {noun}".format(adjective="fantastic", noun="course")
'this is a fantastic course'
Preview 04:50

A cheatsheet covering the .format() method, for you to download and print out.

The .format() cheatsheet
1 page

Lets review how to format strings real quick!

Formatting strings quiz
2 questions

The format() method
1 question

The solution to the "format method" Python coding exercise.

Solution to coding exercise: format()

In this lecture we take a look at getting input from the user in the form of a string.

The input() method takes in a string that is the question to ask to the user, and returns another string, which is whatever the user wrote before pressing Enter.

>>> input("Enter your age: ")
Enter your age: 50
>>> user_age = input("Enter your age: ")
Enter your age: 50
>>> user_age
Getting user input with the input() method

Asking users for input
1 question

The solution to the "Asking users for input" Python coding exercise.

Solution to coding exercise: user input

In this lecture we take a look at creating our own methods, which are none other than names for a set of instructions which execute sequentially.

>>> def my_method():
        x = 10
        y = 50
        print(x + y)
>>> my_method()

Whenever you execute a method, the instructions run from the first instructions to the last.

In order to get the age in seconds, simply get the user's age, convert it to seconds, and then multiply it by 365 * 24 * 60 * 60.

Creating our own methods in Python

Creating methods and functions
1 question

The solution to the "Creating methods and functions" Python coding exercise.

Solution to coding exercise: creating functions

In this lecture we take a look at how to use if, elif, and else to control the flow of our program.

The if clause contains a condition. The code below the if clause only gets executed if the condition is true. The same thing happens with the elif clauses, but you can have many elif clauses (or none). The else clause does not use a condition.

price = 100
if price < 100:
    print("Buy the item!")
elif price == 100:
    print("You could buy it...")
    print("Do not buy the item!")
If statements in Python

Let's check whether we've got everything in that last video!

If statements quiz
3 questions

If statements
1 question

The solution to the "If statements" Python coding exercise.

Solution to coding exercise: if statements

Section 1 assignment video

Review the Python basics in this quiz

Python basics
2 questions

The code from this section posted on GitHub. Have a look!

The Age Program Python Code
Price of a Chair
10 Lectures 46:02
Our Development Environment

Creating virtual environments for Python development

Our Age application in PyCharm

(aside) Tweaking PyCharm

Making our first HTTP GET request

Finding our chair price parsing HTML

Parsing HTML data using BeautifulSoup

Using the price as a number

Revise the basics of HTTP in this quiz

2 questions

This is the code for the "What's a Browser" program, which covers the requests library and BeautifulSoup.

What's a Browser program Python Code
A simple terminal Blog
18 Lectures 01:59:09

If you are in Mac OS X or Linux, MongoDB will require a directory in /data/db. You will need to create this directory and give your user full permissions. After installing MongoDB, open a terminal console and run the following:

>>> sudo mkdir -p /data/db

>>> whoami


>>> sudo chown yourname /data/db

Optionally, you can install MongoDB using Docker instead of following the video. I'd recommend doing this if you don't know what Docker is. If you don't, don't worry! There is no need to use Docker at all.

To install MongoDB through Docker, follow this very short guide:

Installing MongoDB

Some frequently asked questions when running MongoDB. Please read especially with regards to the next video!


Introduction to MongoDB

Creating a PyCharm project that uses MongoDB and pymongo

Simplifying lists in Python with list comprehension

Revise a fabulous topic in Python with this quiz

Python list comprehension
2 questions

Introduction to Object-Oriented Programming

Creating our first class, the Post

Creating a Database class for database interactions

The last few Post methods

Having default parameter values in Python methods

Understanding dates in Python: the datetime module

Verifying that the Post methods all work

The Blog class and @classmethods

Verifying the Blog methods all work

Starting the menu and user interactions

Finalising the Menu class

Finally, running the application!

The code for the Terminal Blog program. Have a wee look after trying to code it yourself!

Terminal Blog program Python Code
Our first web application
20 Lectures 02:36:37

How can we make our own API? What is Flask?

Python cls() and argument unpacking

Creating the User model for our application

Starting developing the User model

Creating the login and register

Finding blogs by a specific author

Allowing creation of blogs and posts

Creating the static resources and templates

Beginning CSS styling of pages

The user login page

The user registration page

Using Bootstrap for the first time for great styling

How can we display a list of blogs?

Displaying a list of posts

The Jinja2 if statement for structure control

Let's review some Jinja2 in this quiz!

Jinja2 revision
3 questions

Creating new blogs (front-end)

Finalising the application by allowing to create posts!

Check out the code for the web blog--remember to try to code it yourself first!

The Web Blog program Python Code
Price alerts for any online web-store!
32 Lectures 03:26:36
Intro and, what could be improved over last section?

Introducing Blueprints for Flask

Creating the app structure so it's easy to develop

Mapping out the app flow

Initialising the app

Initialising the models for our app

Creating our view structure: what do users interact with?

Logging users in: the model

Logging users in: the view

Adding a sample user to the database to verify login works

Introduction to Postman for API testing

Checking the login flow for errors

Registering users: the model

Introduction to RegEx (Regular Expressions)

Validating user e-mails and finalising the registration

Verifying the registration with Postman

Loading item prices with requests and BeautifulSoup

Saving items to MongoDB

Creating our Stores and getting live prices

Don't forget about _id!

Saving stores to MongoDB and using the url_prefix

Checking the MongoDB RegEx search works

Complete flow: from items to stores to prices

Sending e-mails with our app: Mailgun

Setting up the Mailgun Sandbox server

Alert constants required for our e-mails

Setting up our Alert to send e-mails

Getting last updated alerts to decrease load on our app

Saving alerts to MongoDB

Notifying our users when the price is reached!

Entering test data into the application

The complete Alert workflow
Developing a complete front-end with Bootstrap
39 Lectures 03:25:07

In this video we go over creating the template structure for a large application like the Pricing Service.

Creating our Jinja template structure

In this lecture we go over creating the base Jinja inheritance and the homepage of our application.

Using inheritance in our Jinja templates

Here we look at how to fix the PyCharm warning message that tells us the template files could not be found.

Fixing "template not found" error in PyCharm

In this video we look at creating the navigation bar for our application using Bootstrap elements and HTML.

Creating a navigation bar using Bootstrap and HTML

In this lecture we look at making sure the page is mobile-friendly by automatically collapsing the navigation bar if the screen size is small. Bootstrap handles most of this for us, which is great.

Collapsing the navigation bar to be more mobile friendly

An affordance is something that a user knows they can do, parting from something they see. In this video we create an extra affordance for the navigation bar by adding Glyphicons. Also, it makes the navigation bar look much better.

Creating affordances: using Glyphicons in the navigation bar

In this video we look at changing the links and icons on the navigation bar depending on whether the user is logged in or not.

Changing the links if the user is signed in

In this lecture we take a look at using the url_for method in Jinja as opposed to hard-coding the endpoints of our application. This means that later on we can refactor (rename) the endpoints, and we won't have to make any changes on our Jinja templates.

Serving endpoints dynamically using url_for in Jinja templates

In this lecture we look at creating a nice-looking homepage by using the Bootstrap Jumbotron component, which gives visual priority to a call to action.

Using the Bootstrap Jumbotron component for the homepage

In this lecture we look at creating the registration form for our application using Bootstrap and HTML.

Creating the registration form using Bootstrap and HTML

The next step, developing a log-out form so that we can test everything is working in terms of registration and logging out.

Fixing and finalising the logout form

In this video we handle the registration and logging in to our application from a back-end perspective.

Registering and logging in to our application

In this video we look at getting the alerts that a specific user has created, by linking various models together in our back-end.

Getting the alerts for a specific user

In this lecture we refactor the User model by placing the constants (i.e. the MongoDB collection name) on a separate file.

Refactoring the User model and including Constants

In this video we look at displaying the user's alerts on their alerts page, using Bootstrap, Jinja, and HTML.

Showing the user alerts Jinja template

In this lecture we make sure the item price is showing in the alert page, by saving the item to the database along with its price.

Fixing the item price not showing up in the alert page

In this short video we link together the alerts list to the individual alert page, so that we can display more information and option about each individual alert.

Pointing an alert item to an individual alert

In this video we create the Jinja template for the single alert page, to show some information and options about single alerts.

Rendering the single alert Jinja template

In this video we create a button to create a new alert, by using Bootstrap and HTML. We also include a Glyphicon.

Creating a button to add new alerts with Bootstrap and Jinja

In this video we add a form to create new alerts using Jinja and Bootstrap.

Creating the new alert form with Jinja

In this video we finalise the creation of alerts, to make sure our users can start creating their own!

Finalising creating alerts

In this longer video we look at Python decorators. These are an incredibly useful (yet complicated!) tool to have in our Python arsenal.

Advanced Python: decorators

In this video we look at creating manual refresh button for our alerts.

Creating the single alert page and adding manual price refresh

In this video we take a look at adding the ability to deactivate alerts, so that users are not notified about them.

Deactivating an alert

In this video we look at re-activating alerts, so that users can once again be notified about them.

Activating an alert

In this lecture we use Bootstrap and Jinja to dynamically change the colour of list items in the user's alerts page to show whether an alert is active or inactive.

Showing inactive alerts in the Jinja list

In this video we look at adding a button to permanently delete alerts.

Permanently deleting alerts

When creating new alerts, we made a small mistake! The alert price limit was being saved as a string, which means it could not be compared with the price we were getting from the parsed website. In this video we take a look at a quick fix for that.

Fixing the alert price when creating a new alert

In this video we make sure that the alert_updater is only checking alerts that are marked as "active".

Ensuring that we are only checking active alerts

In this video we create the store index page using Jinja and Bootstrap, so that we can display the stores that are supported by our site.

Creating the store index

In this lecture we actually display the list of stores, and we link each store with its own store page.

Showing the list of stores and the store page

In this video we implement the single store page to show some information about a store, as well as more options to do with each store.

Adding the single store page in Jinja

In this video we look at adding the ability to create new stores.

Allowing the creation of new stores

In this video we look at being able to edit and delete stores.

Editing and deleting existing stores

In this video we add the ability for our users to edit their own alert's price points.

Editing existing alerts so users can change the price point

In this lecture we look at how we can use the Flask config property from Jinja files. It's very simple!

Using Flask's config file from Jinja

In this video we quickly create another decorator, this time to make sure only some parts of the website are accessible to administrators.

Creating the requires_admin_permissions decorator

Here we make sure that the Mailgun API call that is sending our users e-mails is actually sending them a link to the alert.

Adding a link in the Mailgun API call

In this final video of this section we fix a couple final bugs and make sure our application is ready for deployment in the next section!

Fixing the last bugs and finishing the application
Simple development-stage deployments to Heroku
27 Lectures 01:27:20

In this video we take a look at how to sign up for GitHub. You'll just need to go to

Signing up for GitHub

In this video we take a look at how to fork a repository from GitHub. Forking a repository copies it and puts it under your account, which means you can change code within the files at will.

Forking the GitHub repository from the last section

In this video we look at how to install Git on Windows. If you are not using Windows, the next few videos go over installing in other platforms.

How to install Git on Windows

In this video we go over using the Windows PowerShell, which comes with Git for Windows.

One important thing to note is that in the Windows PowerShell is that we must use the command `vim` instead of `vi`. We will look at this later on in the course.

How to use the Windows Git Shell

In this video we look at installing Git on Mac.

How to install Git on Mac

In this video we look at installing Git on Linux.

How to install Git on Linux

In this video we take a look at cloning the Git repository that you forked previously, into your computer from GitHub.

Cloning the Git repository from GitHub onto your computer

This video is important as it looks at the different statuses a file may be in during its Git lifetime.

File statuses and stages in Git

In this video we take a look at an important security measure: SSH keys, and how to generate one in your computer for use in GitHub. Whenever you use another computer, you will have to generate an SSH key for that computer to be able to authenticate with GitHub.

How to generate an SSH key for GitHub

In this video we look at two basic Git commands: git commit and git push, used to bundle files together as one 'change', and to push one of more of these bundles, the commits, into the remote repository, which we've got in GitHub.

Git commands: git commit and git push

In this video we look at another Git command: git log, used to check previous commits, their messages, authors, and dates.

Git command: git log to check previous commits

In this short video we look into signing up for Heroku, which is a free server service.

Signing up to Heroku

In order to easily control our Heroku applications and interact with them, we need to install the Heroku Toolbelt, which is a Command-Line Interface to Heroku itself.

Installing the Heroku Toolbelt (Command-Line Interface)

In this video we look into create a new Heroku app. We can do this via the website (as shown), or via the CLI.

Creating a new Heroku app

Environment variables are essential for security in deployments, as it means your sensitive information is not publicly available. In this video we look at getting values from environment variables in Python.

Getting values from environment variables in Python

In this video we look at setting the environment variables in Heroku.

Setting the environment variables in Heroku

Heroku needs a few files to be present in our project, to tell it things like which Python version we want to use, as well as a wrapping server, configuration files, and a Procfile, which tells Heroku how to run our application.

All in all, it needs:

  • Procfile
  • runtime.txt
  • (if using uWSGI), uwsgi.ini
Setting up Heroku required files in our project so Heroku knows what to run

In this video we look at committing and pushing the changes that we made in the last video when we added the required files.

Committing and pushing the new files to GitHub

Making sure our application runs with 1 server, which is the Free tier in Heroku.

Adding servers on Heroku (called 'scaling dynos')

In this video we deploy our app to Heroku, but, alas, it does not work yet. There are a couple things missing.

Deploying our app to Heroku

Heroku and MongoDB work well together, and MongoLab provides a free 'Sandbox' environment for our MongoDB instance.

Adding MongoLab to our Heroku app as an add-on

In this video we look at creating a new MongoLab user. This is not a requirement, and we will not be using the user we create, but in some instances we may want to have multiple users.

How to create a new MongoLab user

Next, we need to change our program's database URI to match the address of MongoLab.

Previously, we were only ever using a local MongoDB instance (, now each MongoLab database may have slightly different addresses. In addition, MongoLab requires that you authenticate (username and password) in your database.

Changing our program's database URI to match MongoLab's

We got an Internal Server Error, so in this video we learn how to check the Heroku logs in order to try and fix it.

Using the Heroku logs to fix an Internal Server Error

Now that the file is present, we can re-run our app in Heroku and find one more error.

Running our deployed app in Heroku

The error stems from MongoLab's implementation of how they limit creation of databases. In MongoLab, we cannot use the 'fullstack' database we were using previously, but we have to use the database they give us. We can access this database with client.get_default_database().

Another error: using the URI default database

Hurrah! The app now works, and it is ready to be given to friends and family! However, remember Heroku in its free tier is not the most optimal form of deployment.

If we want to give the app to our users, we may need something a bit more robust.

In the next section we will look at deploying to a DigitalOcean server.

Verifying the app works, and next steps in the course
Deploying your apps manually to a server
13 Lectures 01:39:01
DigitalOcean Droplets

In this video we look at creating a droplet in DigitalOcean.

Creating your DigitalOcean droplet

In this video we look at logging in to our droplet using the terminal and the ssh command.

Logging in to your droplet

In this video we look at setting up account permissions in our server to increase security. Make sure to check out the downloadable materials!

Setting up account permissions in CentOS

In this video we look at installing Python in CentOS, which by default comes with Python2.6. Make sure to check out the downloadable materials!

Installing Python in CentOS

In this video we look at installing and setting up Nginx to work with our Flask application. Make sure to check out the downloadable materials!

Installing and setting up Nginx in CentOS

In this video we look at creating the application structure. Make sure to check out the downloadable materials, which cover the next three videos.

Creating the application structure for the deployment

In this video we look at forking a GitHub repository and adding SSH keys to it. Make sure to check out the downloadable materials from the previous lecture!

Forking a GitHub repository and adding SSH keys

In this video we look at finally installing the app in the server. Make sure to check out the downloadable materials from two lectures ago!

Installing the app in CentOS

In this video we look at installing MongoDB in CentOS. Make sure to check out the downloadable materials!

Installing MongoDB in CentOS

In this video we look at setting up uWSGI in CentOS, which is used to run the Flask application and interact with Nginx. Make sure to check out the downloadable materials!

Setting up uWSGI in CentOS

In this video we look at running the app! Make sure to check out the downloadable materials!

Running the app directly from your server

In this video we automate the updating of prices and sending e-mails by running the alert updater every 15 minutes, using a cron job. Make sure to check out the downloadable materials!

Adding the cron job to automate sending e-mails
About the Instructor
Jose Salvatierra
4.5 Average rating
3,698 Reviews
25,139 Students
6 Courses
Founder of Teclado and Software Engineer

I've been teaching computer science and playing and teaching music (grades 1 to 8) for over four years, to students of all ages and all skill levels. Here's my story so far.

I started programming at the age of 10, just a couple years after I started studying music, when my dad, excited that I had showed interest in similar things to himself, taught me the basics of Marin Saric's METAL. Shortly thereafter we moved on to RealBASIC, and from there I started learning, after a couple years, Java and C.

Ever since I started learning programming I knew I wanted to study Computer Science or something along those lines. Half a decade ago I ended up at the University of Dundee, studying Applied Computing.

The University of Dundee is one of the most prestigious for computing-related courses, and I was offered the chance to participate in their computing scholarships due to academic achievement.

I have worked for "Eseye", an M2M company, as an intern doing mainly backend developing, writing PHP scripts and programming Zenoss ZenPacks, and currently work for Skyscanner, one of Scotland's largest technology companies, programming mainly in Python and web languages.

At the moment I enjoy programming in Python, Java and C, playing and recording music, usually as an accompanying pianist for singers, and sports and bodybuilding. I hope that my courses are interesting to you, enjoyable and that you learn from them!