Take this

Software Development / Web Development

Learning Flask

Get started with Flask, a powerful web framework for Python that's easy to learn and use


With a growing skills gap, the need for talented developers is greater than ever before. A basic grounding in building apps with a framework as minimalistic, powerful, and easy-to-learn as Flask will be a useful skill to launch you on a career as an entrepreneur or web developer. Flask is a Python micro-framework that makes web application development as easy as saying it.

This course will give you a basic grounding in the fundamental concepts of web development, as well as the hands-on experience you require to successfully build web apps with Flask.

We'll start by turning your computer into a modern development machine. Next, we'll move beyond static websites and develop a powerful database-backed dynamic Flask app. We won’t stop there, because we’ll also cover how to implement a full authentication system.

Finally, we'll extend the app's functionality by learning how to integrate it with third-party APIs.

When you finish this course, you will be fully equipped to build your very own custom web apps.

Full details


  • Setting Up the Environment
    The Course Overview
    This video will offer the overview of the course.
    Text Editor
    Before we start, we will need a text editor to edit our code. • Installing the Sublime text editor • Creating, editing, and saving files • Navigating folders and editing files in the same view
    Command-line Interface
    We will need a command-line interface for communication with the system. • Talking about the difference between a text editor and a command-line interface • Checking command-line interface options available for OS X and Mac users • Installing Cygwin for Windows users
    Version Control
    To handle our project efficiently, we need a version control system. • Installing Git • Signing up for a new GitHub account • Setting up SSH keys
    We will need to install a database in order to save our app's data. • Installing PostgreSQL • Signing up to use PostgreSQL • Creating a database for the app
    We will need to install a virtual environment where we can install Flask. • Talking about the importance of a virtual environment and installing virtualenv • Creating a new, isolated development environment • Installing Flask
    To make our app available to users, we need to create a deployment environment. • Signing up for a new Heroku account • Installing the Heroku Toolbelt • Signing in to Heroku from the command line
    A review of the tools installed. Talking about the various tools installed so far
  • Getting Started
    Project Structure
    Setting up the folders and files needed for a Flask app. • Creating static/ folderfor assets • Creating templates/ folder for web templates • Creating routes.py
    The Request-Response Cycle
    Taking a look at how the files and folders together form the project structure. • Observing what happens when a user visits a page • Understanding the Request-Response life cycle
    Creating a Home Page
    To understand the Request-Response cycle, we will implement a static page. • Creating index.html • Describing how rewriting boilerplate is repetitive and error-prone
    Making Templates
    To write less boilerplate, we will use web templates. • Creating layout.html and filling it with boilerplate • Inheriting layout.html from index.html • Defining web templates
    To actually see the home page, we will implement a controller. • Writing routes.py • Running routes.py to view the home page in the browser
    Using Static Files
    To style the HTML, we will need CSS. • Placing CSS in static/css/ • Applying CSS to a web template using url_for • Viewing the styled home page in the browser
    Saving to GitHub
    To back up our code, we will need to push it to GitHub. • Introducing and using Git commands • Viewing the code in a GitHub repository
    Deploying to Heroku
    To view the app, we will deploy the code to Heroku. • Adding more files to the repository in order to prepare it for Heroku • Pushing the app to Heroku • Viewing the live app
    Creating an About Page
    To practice the repeatable workflow, from creating a home page to deploying it to Heroku again, we will implement another static page. • Creating about.html • Creating a new route and running routes.py • Saving our code to GitHub and deploying to Heroku
    We will put the process from creating a home page to saving it to Github into context. • Reviewing the Request-Response cycle and the development workflow
  • Storing Data
    Creating the "users" Table
    Creating a "users" table in the "learningflask" database. • Understanding the request-response cycle with a model and database • Creating a 'users' table
    Connecting Flask to Postgres
    Connecting the Flask app to Postgres using Flask-SQLAlchemy. • Installing Flask-SQLAlchemy • Configuring Flask-SQLAlchemy
    Writing the User Model
    Creating a User model to communicate with the "users" table. • Setting up models.py • Writing the User class • Taking a look at how to encrypt passwords
  • Signing Up
    Installing Flask-WTF
    To make web forms, we need to use Flask-WTF. • Outline where a sign up page fits in with the Request-Response cycle • Installing Flask-WTF
    Creating a Form
    Writing the form's backend using Flask-WTF. • Creating a new SignupForm class in forms.py
    Rendering a Form
    Writing the form's frontend in a web template. • Creating a new route in routes.py • Creating the template signup.html • Distinguishing between GET and POST requests
    Validating Form Data - Part 1
    To check for incorrectly submitted form data, we will use validators. • Adding a presence validator to the SignupForm class • Editing routes.py to prevent invalid submissions • Editing signup.html to display error messages
    Validating Form Data - Part 2
    Getting more practice in writing validators. • Adding an e-mail validator • Adding a password length validator
    Saving a New User
    If the form data is valid, we need to save it in the users table. • Editing routes.py to save the from data in the database • Submitting some data and checking whether it's there in Postgres
  • Logging In and Logging Out
    In this video, we will talk about sessions that are very important to sign a user in. • Describe what a session is • Use Flask’s session object in /signup folder
    Sign In
    The sign in form allows users to sign in to the app using their credentials. In this video, we’ll write the sign in form’s backend and frontend. • Create a new SigninForm class with validators in forms.pys • Create a new /signin route • Create a signin.html web template
    Sign Out
    Signing out essentially means ending a session. In this video, we’ll take a look at how to do this. • Describe how to sign out a user • Use Flask’s session.pop() in /signout folder
  • Authorization/User Roles
    The app we have created still has two flaws with regard to security. In this video, we’ll take a look at these issues. • Take a look at how users can access pages without logging in • Take a look at how users get redirected to the sign up page even after logging in
    Protecting the Home Page
    In our app, users can still access the home page without logging in. In this video, we’ll see how to avoid this. • Explain how to use the session object in order to determine whether a user is logged in • Use the session object to protect the home page
    Protecting the Signup and Login Pages
    Once logged in, the signup page is still visible to the users. In this video, we’ll solve this issue. • Use the session object to protect the signup page • Use the session object to protect the login page • Introduce Flask-Login as an alternative
  • Bookmarking Places
    We’ll take a look at how to implement the location-based feature of the app. • Demo the location-based feature • Describe how the feature works to set up what’s ahead to implement
    Adding a Form
    We’ll add an address form to our home page. • Create a new form in forms.py • Instantiate the form in routes.py • Display the form in home.html
    Querying for Places
    We’ll take a look at how to query an address in order to find places near it. • Introduce the geodata API • Describe how a model can wrap the API • Write the Place class in models.py
    Rendering Places
    In this video, we’ll render the places we need on the map. • Introduce leaflet.js • Render the map and the markers • Render the sidebar
    In this video, we’ll be wrapping and concluding our course. • Summarize what was done • Offer next steps


  • Flask
  • Front-End Web Development
  • Python
  • Web Development

Similar Courses

More Courses by this Instructor