REST APIs with Flask and Python in 2024

Build professional REST APIs with Python, Flask, Docker, Flask-Smorest, and Flask-SQLAlchemy

4.56 (22113 reviews)
Udemy
platform
English
language
Web Development
category
125,286
students
12 hours
content
Jan 2024
last update
$119.99
regular price

What you will learn

Connect web or mobile applications to databases and servers via REST APIs

Create secure and reliable REST APIs which include authentication, deployments, and database migrations

Understand the different layers of a web server and how web applications interact with each other

Handle seamless user authentication with advanced features like token refresh

Handle log-outs and prevent abuse in your REST APIs with JWT blacklisting

Develop professional-grade REST APIs with expert instruction

Optimize performance of your REST APIs using task queues and background workers

Description

Are you tired of boring, outdated, incomplete, or incorrect tutorials? I say no more to copy-pasting code that you don’t understand.

Welcome to the bestselling REST API course on Udemy! I'm Jose. I'm a software engineer, here to help you truly understand and develop your skills in web and REST API development with Python, Flask, and Docker.

Production-ready REST APIs with Flask

This course will guide you in creating simple, intermediate, and advanced REST APIs including authentication, deployments, databases, and much more.

We'll start with a Python refresher that will take you from the very basics to some of the most advanced features of Python—that's all the Python you need to complete the course.

Using Flask and popular extensions Flask-Smorest, Flask-JWT-Extended, and Flask-SQLAlchemy we will dive right into developing complete, solid, production-ready REST APIs.

We will also look into essential technologies like Git and database migrations with Alembic.


You'll be able to...

  • Create resource-based, production-ready REST APIs using Python, Flask, and popular Flask extensions;

  • Handle secure user registration and authentication with Flask.

  • Using SQLAlchemy and Flask-SQLAlchemy to easily and efficiently store resources to a database; and

  • Understand the complex intricacies of deployments of Flask REST APIs.

  • Use Docker to simplify running and deploying your REST APIs.


But what is a REST API anyway?

A REST API is an application that accepts data from clients and returns data back. For example, a REST API could accept text data from the client, such as a username and password, and return whether that is a valid user in the database.

When developing REST APIs, our clients are usually web apps or mobile apps. That's in contrast to when we make websites, where the clients are usually the users themselves.

Together we'll develop a REST API that not only allows clients to authenticate but also to store and retrieve any data you want from a database. Learning this will help you develop any REST API that you need for your own projects!


I pride myself on providing excellent support and feedback to every single student. I am always available to guide you and answer your questions.

I'll see you on the inside. Take your first step towards REST API mastery!

Content

Welcome!

How to take this course
Before we get started: a self-assessment
Python on Windows
Python on Mac

A Full Python Refresher

Introduction to this section
Access the code for this section here
Variables in Python
Variables
Solution to coding exercise: Variables
String formatting in Python
Getting user input
Writing our first Python app
Lists, tuples, and sets
Advanced set operations
Lists, tuples, and sets
Solution to coding exercise: Lists, tuples, sets
Booleans in Python
If statements
The 'in' keyword in Python
If statements with the 'in' keyword
Loops in Python
Flow control—loops and ifs
Solution to coding exercise: Flow control
List comprehensions in Python
Dictionaries
Destructuring variables
Functions in Python
Function arguments and parameters
Default parameter values
Functions returning values
Functions
Solution to coding exercise: Functions
Lambda functions in Python
Dictionary comprehensions
Dictionaries and students
Solution to coding exercise: Dictionaries
Unpacking arguments
Unpacking keyword arguments
Object-Oriented Programming in Python
Magic methods: __str__ and __repr__
Classes and objects
Solution to coding exercise: Classes and objects
@classmethod and @staticmethod
@classmethod and @staticmethod
Solution to coding exercise: @classmethod and @staticmethod
Class inheritance
Class composition
Type hinting in Python 3.5+
Imports in Python
Relative imports in Python
Errors in Python
Custom error classes
First-class functions
Simple decorators in Python
The 'at' syntax for decorators
Decorating functions with parameters
Decorators with parameters
Mutability in Python
Mutable default parameters (and why they're a bad idea)
Conclusion of this section

Your first REST API

Introduction to this section
What is an API?
Installing Flask
Access the code for this section here
Your first Flask application
HTTP Verbs
REST Principles
Creating our application endpoints
Returning a list of stores
Implementing other endpoints
Calling the API from JavaScript
Using Postman for API testing
Conclusion of this section

Flask-RESTful for more efficient development

Welcome to this section
Virtualenvs and setting up Flask-RESTful
Access the code for this section here
Your first Flask-RESTful app
Test-first API design—what is that?
Creating our Item Resource
The ItemList and creating Items
Improving code and error control
Authentication and logging in—part 1
Authentication and logging in—part 2
DELETE to delete Items
PUT to create or update Items
Advanced request parsing with Flask-RESTful
Optimising our final code and request parsing
Conclusion of this section

Storing resources in a SQL database

Welcome to this section
Setting up our project
Access the code for this section here
Running a SQLite database and interacting with it from Python
Logging in and retrieving Users from a database
Signing up and writing Users to a database
Preventing duplicate usernames when signing users up
Retrieving our Item resources from a database
Writing our Item resources to a database
Deleting our Item resources from the database
Refactoring insertion of items
The PUT method with database interaction
Retrieving many items from the database
Advanced Flask-JWT Configuration
Conclusion of this section

Simplifying storage with Flask-SQLAlchemy

Welcome to this section!
Access the code for this section here
Setting up this section's project
Improving the project structure and maintainability
Creating User and Item models
Verifying the app works after our changes
Advanced Postman: environments and tests
Errata: small mistake in code in the next video
Telling SQLAlchemy about our tables and columns
Implementing the ItemModel using SQLAlchemy
Implementing the UserModel using SQLAlchemy
Easily displaying the ItemList resource with SQLAlchemy
No more creating tables manually—telling SQLAlchemy to create tables
Creating a new model: StoreModel
Creating the Store Resource
Final testing of this section's API
Conclusion of this section

Git—version control

Welcome to this section
Installing Git on Mac and Windows
What is a Git repository?
The Git workflow—part 1
The Git workflow—part 2, including GitHub
Using SSH keys for security
The README file
Conclusion of this section

Deploying Flask apps to Heroku

Welcome to this section
Access the code for this section here
What is Heroku?
Getting our code into GitHub
Setting up Heroku for Flask
Adding the required files to the project
Logs in Heroku and troubleshooting errors
Testing the deployed API with Postman
Adding PostgreSQL to our Heroku app
Working with Git and automatic deploys
Conclusion of this section

Deploying Flask apps to our own server

Welcome to this section
Setting up a DigitalOcean server
Want to deploy to AWS?
Installing PostgreSQL in Ubuntu 16.04
Creating a UNIX user in Ubuntu 16.04
Setting up our new user with PostgreSQL permissions
Setting up nginx and our REST API
Setting up uWSGI to run our REST API
Testing our API to make sure everything works
Conclusion of this section

Security in your REST APIs

Welcome to this section
Security in REST APIs e-book
Getting our domain name
Setting up Cloudflare
What is DNS?
Setting our DNS records
Verifying everything works—this is important!
Creating our SSL certificate in Cloudflare
Configuring nginx for SSL
Security in REST APIs
Extra technical SSL resources
Conclusion of this section

Token refreshing and Flask-JWT-Extended

Welcome to this section
A recap of the code + a few changes!
Creating a User Resource for testing
Testing our new Resource with Postman
Logging in with Flask-JWT-Extended
Testing the login with Postman
Adding JWT Claims
Getting the JWT identity in and endpoint and @jwt_optional
What is a fresh token?
Performing token refresh in our REST API
Requiring a fresh token in an endpoint
Customizing Flask-JWT-Extended callbacks and responses
Blacklisting with Flask-JWT-Extended
Logging users out in our REST API
E-book: complete review of the API so far
Flask-JWT-Extended further reading

Bonus Section

Bonus lecture: other courses and next steps

Screenshots

REST APIs with Flask and Python in 2024 - Screenshot_01REST APIs with Flask and Python in 2024 - Screenshot_02REST APIs with Flask and Python in 2024 - Screenshot_03REST APIs with Flask and Python in 2024 - Screenshot_04

Reviews

Mike
November 12, 2023
The detail-oriented nature of this course is hugely intimidating. Why am I giving it a 5/5 then? Because buried in the details is an important message: it can be done. Whatever you are brainstorming for your electronic/computer/internet project, there are resources out there--both human capital and educational/technical--to achieve nearly any goal. This was a whirlwind of new concepts for me, and I think it solidified my background in web development (mostly horizontally though also with rather strong depth, as well). I tried coding along for a while but got fed up with it. Fortunately, this is Udemy--so you have no expiration on access to the course, and can revisit any of the concepts if you ever wish to. Course lecture style was casual-professional. No inappropriate behavior of any sort noticed, and the lecturer was down-to-Earth. TAs answered questions promptly and professionally. Highly recommended if you're looking for some more server-side resources for your skill development andor projects.
Kevin
November 11, 2023
It is concise and I believe that if Jose continues the course in this fashion, I will be learning very quickly.
Joss
November 2, 2023
It seems like this would be a good course for people who are already experienced in REST APIs in another language, and just want a quick crash course in how to do it in Python. The sections on Python syntax, Docker and Git are very basic compared to the rest of the course, which is fairly advanced. I'm not sure why they are included. It maybe would have been better to mention them as prerequisites in the course description and spend more time on the core content. Conversely I would have like to understand more about Flask, REST APIs and HTTP before importing a load of Flask plugins, which I'm sure are great but really muddy the waters if you are new to vanilla Flask. The e-book is OK, but the videos are quite rushed, and the instructor does not give much context or rationale to what he is doing, so following along just becomes a copy-paste exercise without much high-level learning. In any case definitely not worth paying the full price as I think the information isn't much higher quality than what you can get on YouTube or other free tutorial sites.
Danny
October 17, 2023
Just feels slightly lazy and rushed especially nearer to the end of the course. Some of it is not up to date.
Cole
September 18, 2023
Hands down the most useful course I've taken for supplementing my knowledge as a data engineer. Couldn't recommend enough!
Uday
September 16, 2023
not able to understand sqlalchemy and because of version change it give many error you should teach like first what is use case and when should you use and not use and how to use still Thank you sir .
Csongor
September 4, 2023
The code was many times just pasted in by the tutor and often not explained well enough. I have learned almost nothing from watching this course. The only thing I have now is a python flask application which I can copy and paste. Very disappointed...
Brian
September 3, 2023
Thought I paid for more hours of Flask - but way too much time on basic Python. Huge thumbs down. I would have read the documentation if I knew it would be approx. 6 hours of Flask.
Xiaoqiu
August 27, 2023
Ads of render.com and mailgun. For production you should show how to setup your own production environment. Not show us the third party product. If you want to discuss render.com and mailgun you should put it in another course. Everything goes docker now then you just need to deploy docker to your server.
Abhishek
August 23, 2023
If it's Python-related, I always blindly enroll in courses by Jose Salvatierra. He is the only instructor I have been able to follow along properly. Keep up the great up with the course content!
Avi
August 21, 2023
It was really goo course as I got to know regarding Flask, Blueprints, password authentication and database knowledge.
Samuel
August 19, 2023
Great explanation of concepts and different technologies and services covered. I learned about Docker, Render, Databases, Sending emails and more.
Marianthi
August 16, 2023
This is great! Jose is knowledgeable but better yet his delivery method and explanations are top notch. Everything is clear, examples are easy to understand and the exercises are interactive which is really the best way to practice. I've taken the course because I'm interested in developing APIs but I skimmed through the Python refresher and it was amazing as well. I'll be looking into other courses where Jose is the instructor. Many thanks!
Jason
August 13, 2023
It's a good course to learn the knowledge for building an completing API website with backend technology by using Python. It has some problemes in the video, because this course had published for a long time, some packages in the python or OS system version would be changed, you may spend several time to solve your proplem, read e-book, compare with docs in the github, slow down the video and repeat again, find Q&A history, or ask teacher. Therefore it may not suitable for freshman to learn python, It's highly requires student has self-solution ability if you don't want to wait teacher's response for days. I experience the video is very fast, including speak and manipulation, with Udemy lower frame simple rate, it's hard to study and follw, I hope improvement in the future.
Aleksandra
August 1, 2023
Python part: great! even though difficult topics like imports and OOP where a little bit rushed. The rest was perfect. API part: very rushed and if you will not use ALL of the examples (already have a database or you do not want to / cannot use dockers) then the rest of the sections are also lost, because it is all connected to this blueprint marshmallow smorest docker model alchemy soup. example: I would like to implement the user authentication in API with my database but it is already all deeply intertwined with dockers and sql alchemy, there is user class model etc and its impossible to follow.

Charts

Price

REST APIs with Flask and Python in 2024 - Price chart

Rating

REST APIs with Flask and Python in 2024 - Ratings chart

Enrollment distribution

REST APIs with Flask and Python in 2024 - Distribution chart

Related Topics

970600
udemy ID
9/28/2016
course created date
6/9/2019
course indexed date
Bot
course submited by