Skip to main content

REST APIs with Flask and Python

11h 56m 4s
English
Paid

Welcome! Tired of outdated and incomplete tutorials? Say goodbye to copy-pasting code you don’t understand. You've found one of the best resources online for creating REST APIs. I'm Jose, a dedicated software engineer, here to help you truly master web and REST API development with Python and Flask.

Course Overview

Learn to Create Production-ready REST APIs with Flask

This course will empower you to develop simple, intermediate, and advanced REST APIs, incorporating essential features like authentication, deployments, caching, and more.

We'll start with a comprehensive Python refresher, covering everything from the basics to advanced features—ensuring you have the Python knowledge needed throughout the course.

Using Flask and popular extensions like Flask-RESTful, Flask-JWT, and Flask-SQLAlchemy, you'll dive into developing robust, production-ready REST APIs.

We'll also explore crucial technologies such as Git, Heroku, and nginx.

Key Skills You Will Acquire

  • Create resource-based, production-ready REST APIs using Python, Flask, and popular Flask extensions.
  • Securely handle user registration and authentication with Flask.
  • Use SQLAlchemy and Flask-SQLAlchemy to efficiently manage database resources.
  • Gain an in-depth understanding of deployments and optimize Flask REST APIs performance.

Understanding REST APIs

What is a REST API?

A REST API is an application that accepts data from clients and returns data back, capable of performing numerous tasks. For instance, in this course, we build a REST API that processes client text data, stores it in a database, and returns data back for the client to display.

Typically, REST API clients are web or mobile apps, unlike web applications, where clients often directly interact with the user.

Course Support and Expectations

Expect exceptional support and feedback. I'm committed to helping each student personally, always available to guide you and answer your questions.

I can't wait to see you inside. Together, let's master REST API development!

Course Requirements

  • Some prior programming experience in any language is beneficial. The course includes a comprehensive Python refresher.
  • All required software is free and provided during the course.
  • Complete beginners may consider taking a beginner Python course prior to this one for a smoother transition.

Target Audience

  • Students eager to extend their mobile and web applications using server-side technologies.
  • Software developers aiming to enhance their skillset with professional-grade REST API development.
  • Those interested in learning Python with a focus on web service applications.

What You'll Learn

  • Seamlessly connect web or mobile applications to databases and servers via REST APIs.
  • Develop secure and reliable REST APIs, featuring authentication, logging, caching, and more.
  • Comprehend the various layers of web servers and the interactions between web applications.
  • Implement seamless user authentication with advanced features like token refresh.
  • Manage log-outs and prevent abuse with JWT blacklisting in your REST APIs.
  • Create professional-grade REST APIs through expert instruction.

About the Author: udemy

udemy thumbnail
By connecting students all over the world to the best instructors, Udemy is helping individuals reach their goals and pursue their dreams. Udemy is the leading global marketplace for teaching and learning, connecting millions of students to the skills they need to succeed. Udemy helps organizations of all kinds prepare for the ever-evolving future of work. Our curated collection of top-rated business and technical courses gives companies, governments, and nonprofits the power to develop in-house expertise and satisfy employees’ hunger for learning and development.

Watch Online 111 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 111 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Introduction to this section
All Course Lessons (111)
#Lesson TitleDurationAccess
1
Introduction to this section Demo
01:02
2
Variables in Python
08:27
3
Solution to coding exercise: Variables
02:01
4
String formatting in Python
06:27
5
Getting user input
05:17
6
Writing our first Python app
03:20
7
Lists, tuples, and sets
06:32
8
Advanced set operations
04:40
9
Solution to coding exercise: Lists, tuples, sets
04:41
10
Booleans in Python
05:01
11
If statements
08:18
12
The 'in' keyword in Python
02:03
13
If statements with the 'in' keyword
08:19
14
Loops in Python
11:08
15
Solution to coding exercise: Flow control
03:09
16
List comprehensions in Python
07:25
17
Dictionaries
08:32
18
Destructuring variables
08:29
19
Functions in Python
10:42
20
Function arguments and parameters
07:41
21
Default parameter values
03:55
22
Functions returning values
07:20
23
Solution to coding exercise: Functions
02:31
24
Lambda functions in Python
07:53
25
Dictionary comprehensions
04:02
26
Solution to coding exercise: Dictionaries
06:17
27
Unpacking arguments
10:25
28
Unpacking keyword arguments
08:45
29
Object-Oriented Programming in Python
15:53
30
Magic methods: __str__ and __repr__
06:26
31
Solution to coding exercise: Classes and objects
05:05
32
@classmethod and @staticmethod
14:04
33
Solution to coding exercise: @classmethod and @staticmethod
05:55
34
Class inheritance
08:33
35
Class composition
06:09
36
Type hinting in Python 3.5+
05:09
37
Imports in Python
09:34
38
Relative imports in Python
08:54
39
Errors in Python
12:48
40
Custom error classes
05:05
41
First-class functions
07:53
42
Simple decorators in Python
07:13
43
The 'at' syntax for decorators
03:34
44
Decorating functions with parameters
02:25
45
Decorators with parameters
04:51
46
Mutability in Python
06:04
47
Mutable default parameters (and why they're a bad idea)
04:28
48
Overview of the project we'll build
04:01
49
Initial set-up for a Flask app
04:37
50
Your first REST API endpoint
04:06
51
What is JSON?
03:44
52
How to interact with and test your REST API
04:30
53
How to create stores in our REST API
05:38
54
How to create items in each store
07:56
55
How to get a specific store and its items
04:40
56
What are Docker containers and images?
13:29
57
How to run a Flask app in a Docker container
11:16
58
Data model improvements for our API
15:41
59
General improvements to our first REST API
07:08
60
New endpoints for our first REST API
09:06
61
How to run the API in Docker with automatic reloading and debug mode
06:27
62
How to use Blueprints and MethodViews in Flask
10:26
63
How to write marshmallow schemas for our API
04:02
64
How to perform data validation with marshmallow
04:32
65
Decorating responses with Flask-Smorest
04:40
66
Overview and why use SQLAlchemy
02:08
67
How to code a simple SQLAlchemy model
04:46
68
How to write one-to-many relationships using SQLAlchemy
09:43
69
How to configure Flask-SQLAlchemy with your Flask app
07:55
70
How to insert data into a table using SQLAlchemy
07:22
71
How to find models in the database by ID or return a 404
03:59
72
How to update models with SQLAlchemy
05:11
73
How to retrieve list of all models
00:50
74
How to delete models with SQLAlchemy
01:12
75
Conclusion of this section
03:54
76
Changes in this section
02:48
77
One-to-many relationship between stores and tags
10:54
78
Many-to-many relationship between items and tags
11:24
79
Who uses the JWT?
10:16
80
How to set up Flask-JWT-Extended with our app
04:17
81
Coding the User model and schema
02:08
82
How to add a register endpoint to the REST API
09:36
83
How to add a login endpoint to the REST API
08:39
84
Protect endpoints by requiring a JWT
06:01
85
JWT claims and authorization
05:56
86
How to add logout to the REST API
06:20
87
Request chaining with Insomnia
04:33
88
Token refreshing with Flask-JWT-Extended
09:31
89
How to add Flask-Migrate to our Flask app
01:39
90
Initialize your database with Flask-Migrate
05:43
91
Change SQLAlchemy models and generate a migration
05:02
92
Manually review and modify database migrations
03:20
93
What are Git repositories and commits?
09:44
94
Initialize a Git repository for our project
08:28
95
Writing Markdown for documents and commits
02:37
96
Remote repositories and how to use them
05:28
97
Git branches and merging
06:18
98
Merge conflicts and how to resolve them
05:31
99
Overview of the final e-book chapters
01:39
100
Creating a Render.com web service
05:55
101
How to run Flask with gunicorn in Docker
06:14
102
Get a deployed PostgreSQL database
01:52
103
Use PostgreSQL locally and in production
17:46
104
Test the finished production app
01:39
105
How to send emails with Python and Mailgun
04:48
106
How to send emails when users register
09:38
107
What is a task queue and setting up a Redis database
05:06
108
How to Populate and consume the task queue with rq
06:27
109
How to process background tasks with the rq worker
05:25
110
How to send HTML emails using Mailgun and Python
10:18
111
How to deploy a background worker to render.com
05:40
Unlock unlimited learning

Get instant access to all 110 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription