Skip to content

tecladocode/rest-apis-flask-python

Repository files navigation

REST APIs with Flask and Python

REST APIs with Flask and Python (Udemy banner image)


💡 A full course to teach you how to use Flask and Python to make REST APIs using multiple Flask extensions and PostgreSQL.

Getting started

Enrol in the course by going to this link.

Then you can come back here to download the repository. This repository contains the code that we develop in each section of the course.

If you are familiar with Git, you can use Git to download it. Otherwise, you can download it as a zip file:

Download repo as a zip file

Next, start taking the course at the beginning! You can use the downloaded code files to support you while you go through the course.

I also strongly recommend you code while you take the course. A good strategy is:

  1. Watch the video intently, optionally while taking notes.
  2. Watch again, more quickly, while typing the code together with me.
  3. Once you're done with the video, play about with the code. Make changes, break things, then fix them, and try to thoroughly understand everything the code does.

If you do this for the entire course, I guarantee you will learn how to make REST APIs using Flask and Python well and quickly. You'll still be using Google and searching for stuff every day, but so does everyone else!

Section 2: A Full Python Refresher

This section (only available on Udemy) helps programmers who are new to Python get acquainted with the language. It is not a complete-beginner Python course!

Section 3: Your first REST API

The code in this section includes a simple Flask app that accepts and returns JSON data.

Section 4: Docker

Introduction to Docker to run your REST APIs. We talk about images, containers, and how to run applications.

Section 5: Flask-Smorest

We introduce the Flask-Smorest extension, a library that greatly simplifies writing REST APIs using Flask. It also provides things like automated documentation generation.

Section 6: Flask-SQLAlchemy

The code in this section extends the previous section by replacing the data storage in Python lists with SQLAlchemy, an ORM (Object-Relational Mapping which simplifies connecting to and interacting with a database.

Section 7: Many-to-many relationships

In this section we talk about many-to-many relationships using SQLAlchemy.

Section 8: Authentication with Flask-JWT-Extended

Learn how to perform user authentication using JWTs and the Flask-JWT-Extended library. Here we talk about access token JWTs, as well as refresh tokens, JWT claims, blocklists, password hashing, and more.

Section 9: Flask-Migrate

After deploying your apps, making changes to the database can be really tricky because you have to log in to the database server and manually update the database tables using SQL commands.

Flask-Migrate and the Alembic libraries simplify this job by creating migration scripts.

Section 10: Git Crash Course

A quick and intense course on Git and GitHub for code sharing.

Section 11: Deploying to Render.com

Learn how to get your code running in the cloud and make it publicly accessible. In this section we use Render.com for deployments and we also deploy a PostgreSQL database.