Complete Python Web Course: Build 8 Python Web Apps
4.4 (4,129 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
27,541 students enrolled

Complete Python Web Course: Build 8 Python Web Apps

Build Python Web Applications from Beginner to Expert using Python and Flask
4.4 (4,129 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
27,547 students enrolled
Last updated 7/2020
English [Auto], Portuguese [Auto], 1 more
  • Spanish [Auto]
Current price: $76.99 Original price: $109.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 15.5 hours on-demand video
  • 14 articles
  • 3 downloadable resources
  • 6 coding exercises
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll 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
Course content
Expand all 161 lectures 15:39:08
+ Your Age in Seconds
20 lectures 56:10

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:01

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
11 lectures 46:28
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
Why scraping sometimes fails
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
19 lectures 01:59:36
Our MongoDB e-book

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:30
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
+ [2019] Price alerts for online web-stores
26 lectures 03:18:54
Creating new Python projects in PyCharm 2019
Get the price alert code here!
What are Flask Blueprints?
Creating our new app structure
Getting page content with requests
How to find the price on a website
Getting an element's content with BeautifulSoup
Using RegEx to get specific information from a string
Creating our Item model
Adding type hinting to our application so far
Starting up MongoDB and making sure it's working
Preparing our Item model for saving in MongoDB
Inserting Items into MongoDB
Retrieving Items from MongoDB
Notifying users in a simple way when the price is reached
What is an abstract class in Python?
Making more methods generic
Finishing up the Model superclass
How to force a subclass to have properties of a parent class
Type hinting the current object type in a method return
Creating items through the web interface
Styling our site using Bootstrap 4
Creating the Items blueprint
Creating a page to show all items
Creating alerts through the web interface
A couple problems and solutions with our app... and our way moving forward
+ [2019] Developing a complete front-end with Bootstrap 4
25 lectures 03:38:58
Introducing stores to our application
Getting rid of items
Testing our app with stores
Dataclasses in Python 3.7
Turning our models into dataclasses
Giving names to alerts in our application
Saving the last item price
Creating stores through the web interface
Editing alert properties
Linking the alert index to the edit page
Editing stores
Deleting alerts
Deleting stores
Registering users
Encrypting passwords in Python with passlib
Logging in
Viewing only your own alerts
What are Python decorators?
Limiting some pages only to logged in users
Adding a navigation bar using Bootstrap
Limiting actions to admins only
Logging out
Signing up with Mailgun
Sending e-mail with Mailgun
Creating the landing page
+ Simple development-stage deployments to Heroku
28 lectures 01:28:22

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
[New 2019] Changes to Heroku deployments

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
12 lectures 53:06
DigitalOcean Droplets
Creating a DigitalOcean Droplet
Creating a non-root user
Configuring our new user
Installing Python in Ubuntu
Installing MongoDB in Ubuntu
Getting our application code
Configuring uWSGI and the system service
Configuring nginx
Creating a cron job in Ubuntu
Course conclusion. Thank you!
Bonus lecture: other courses and next steps
  • 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

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 this course is for:
  • This course is for students who know a little bit of Python or another programming language who want to learn about deployments and development with Python
  • If you are an absolute beginner in programming, taking an introductory Python course first could be helpful!