Skip to main content
CF

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

Udemy is the largest open marketplace for online courses on the internet. Founded in 2010 by Eren Bali, Oktay Caglar, and Gagan Biyani and headquartered in San Francisco, the company went public on the Nasdaq in 2021 under the ticker UDMY. The platform hosts well over two hundred thousand courses across software development, IT and cloud, data science, design, business, marketing, and creative skills, taught by tens of thousands of independent instructors. Roughly seventy million learners use it worldwide, and the corporate arm — Udemy Business — supplies a curated subset of that catalog to enterprise customers.

Because Udemy is a marketplace rather than a single editorial publisher, the catalog is uneven by design. The strongest material lives in the long-form, project-based courses authored by working engineers — full-stack JavaScript, React, Node.js, Python data science, AWS, Docker and Kubernetes, mobile development with Flutter and React Native, and cloud certification preparation. The CourseFlix listing under this source is the slice of that catalog that has been mirrored here for offline-friendly viewing, organized by topic and updated as new releases land. Pricing on Udemy itself swings dramatically with the site's near-permanent sales, which is why the platform is best treated as a deep reference catalog: pick instructors with strong reviews and a track record of updating their material rather than buying on the headline price alone.

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

Course content

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

Related courses

Frequently asked questions

What is REST APIs with Flask and Python about?
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…
Who teaches REST APIs with Flask and Python?
REST APIs with Flask and Python is taught by Udemy. You can find more courses by this instructor on the corresponding source page.
How long is REST APIs with Flask and Python?
REST APIs with Flask and Python contains 111 lessons with a total runtime of 11 hours 56 minutes. All lessons are available to watch online at your own pace.
Is REST APIs with Flask and Python free to watch?
REST APIs with Flask and Python is part of CourseFlix's premium catalog. A CourseFlix subscription unlocks the full video player; the course description, table of contents, and preview information are available to everyone.
Where can I watch REST APIs with Flask and Python online?
REST APIs with Flask and Python is available to watch online on CourseFlix at https://courseflix.net/course/rest-apis-with-flask-and-python. The page hosts every lesson with the integrated video player; no download is required.