Advanced REST APIs with Flask and Python

Advanced REST APIs with Flask and Python
Advanced REST APIs with Flask and Python
English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 12.5 Hours | 6.01 GB

Take your REST APIs to a whole new level with this advanced Flask and Python course!

Welcome to our Advanced REST API Course!

We created the most popular introductory REST API development course on Udemy, with over 4,000 reviews and 20,000 students. Now we want to help you get even farther with this Advanced REST API course, of course still using Flask and Python.

Our first course took you from zero to a deployed REST API that users could access. In this one we will cover a whole bunch of topics students have been requesting for months!

Topics covered

  • Use Marshmallow for data serialization and deserialization
  • Send e-mails and user confirmations
  • Upload images
  • Database migrations
  • Easy ways of writing documentation and testing your API
  • Handle payments using Stripe
  • Third party login using OAuth (GitHub is used as the example)
  • Extensive software development knowledge, refactoring, debugging, and more!
  • Use the latest technologies and the best practices. We teach everything using Python 3.7, the latest version.

Course structure

We’ll start with a simple REST API and teach you everything you need to know about it—so even if you’ve not taken our first course, you can follow along with absolutely no issues. We’ve even written an e-book to get you up to speed quickly with this starter REST API!

We introduce new features and technologies by baking them into this application so you can see how a professional REST API is developed. Every new feature is added to a fully working application and tested!

We’ll also help you understand more about how to build features incrementally to get them to your users quickly and minimise risk!

Extra resources

Many lectures contain extra resources, such as links to external documentation and projects, for you to go and learn more. And for each lecture, we include the source code at the start and at the end so you’ll never be lost. All source code is provided as downloadable and also in GitHub for your convenience.

We’re always available to help in the Udemy Course Q&A and also our own student community Slack channel. Make use of these awesome resources!

Advanced course

Remember, this is our most advanced course yet! You should have enough programming experience with Python or another programming language. Some knowledge of how the web works is also really helpful.

You should have knowledge of how to install Python packages and how to run your Python applications. If you’ve used virtualenv or Pipenv before, that’s excellent! Knowledge of PyCharm for debugging is also a plus, although we will cover using the debugger in the course!

What you’ll learn

  • Integrate advanced functionality in your API such as image upload, payments, or user confirmation e-mails!
  • Bring your REST API development to a whole new level by getting familiar with more of the Flask ecosystem
  • Improve operations of existing REST APIs with database migrations and extensive refactoring knowledge
  • Easily deploy documentation pages and test your API with Postman’s collection runner
Table of Contents

1 Why you should take this course!
2 Adding custom JSON types
3 Using the current class as a type hint
4 Using Black for code formatting
5 Improving errors with constants
6 @classmethod across the board
7 Testing our API with Postman
8 Conclusion of this section
9 Introduction to this section
10 Access the e-book for Section 1 here!
11 Our project and endpoints
12 Reviewing the beginner course code
13 Simplifying our error handling
14 Refactoring our resources
15 Should we have unique names
16 Adding basic type hinting

Serialization with Marshmallow
17 Introduction to this section
18 Deduplicating error handling
19 Conclusion of this section
20 Serialization with Marshmallow
21 Deserialization with Marshmallow
22 Migrating from virtualenv to Pipenv
23 Postman collection for this section
24 Using vanilla Marshmallow with the API
25 Introduction to Flask-Marshmallow
26 Adding items to our REST API
27 Adding stores to our REST API

E-mail confirmations
28 Introduction to this section
29 Creating our Mailgun library file
30 Using .env files in Flask
31 Adding more configuration to .env
32 Error handling in Mailgun
33 Conclusion of this section
34 Introduction to e-mail confirmation
35 Postman collection for this section
36 Adding an activated property
37 Activating users manually
38 Telling users they are active
39 Setting up Mailgun
40 Sending e-mails with Mailgun (Part 1)
41 Sending e-mails with Mailgun (Part 2)

Advanced e-mail confirmation
42 Introduction to this section
43 What are localisation and internationalisation
44 Storing strings in config files
45 Creating a simple translation library
46 Updating our resources to use translations
47 Adding a new language to our API
48 What is Flask-Babel
49 Common pitfalls and advice
50 Conclusion of this section
51 Postman collection for this section
52 Creating the ConfirmationModel
53 Changes in our UserModel
54 Creating our ConfirmationResource
55 Updating our UserResource
56 Adding the last confirmation to the user schema
57 Fixing our
58 Cross-resource dependencies are (generally) bad

Postman documentation and tests
59 Introduction to this section
60 More options for publishing documentation
61 Conclusion of this section
62 Postman collection for this section
63 Collection and request descriptions
64 Recap of Postman environments
65 JavaScript tests in Postman
66 Running entire collections in Postman
67 Adding example requests and responses
68 Previewing our Postman documentation
69 Publishing our documentation page

Image uploads
70 Introduction to this section
71 Retrieving and deleting images
72 Another example user avatars
73 Adding the avatar resource
74 Conclusion of this section
75 Postman collection for this section
76 Installing Flask-Uploads
77 Config files in Flask
78 What are wsgi and Werkzeug
79 Creating our image helper library
80 Creating our image schema
81 Creating our image upload resource
82 Trying out our image upload

Database migrations
83 Introduction to this section
84 Adding a new column with migrations
85 Problems that can happen while migrating
86 A word of caution!
87 Defining a SQLAlchemy naming convention
88 When should you read documentation
89 Conclusion of this section
90 Getting a PostgreSQL database
91 What’s in our starter code
92 Postman collection for this section
93 Connecting to our remote database
94 Initialising Flask-Migrate and Alembic
95 Creating our initial table structure
96 Our first database migration
97 Checking the Alembic script (important!)

Third party login with OAuth
98 Introduction to this lecture
99 What is a tokengetter
100 Finishing our GithubAuthorize resource
101 Adding some error handling
102 Setting user passwords
103 Using url for with Flask-RESTful
104 Conclusion of this section
105 Introduction to OAuth 2.0
106 What’s in our starter code
107 Postman collection for this section
108 Creating a GitHub OAuth App
109 Flask-OAuthlib
110 Setting up our GitHub client
111 Our GithubLogin resource
112 What is Flask’s g

Payments with Stripe
113 Introduction to this section
114 Charging orders with Stripe
115 Calculating the amount and description
116 Testing our OrderResource
117 Creating a way to view existing orders
118 When things go wrong error handling in Stripe
119 Security considerations in payments
120 Conclusion of this section
121 Setting up our Stripe account
122 What’s in our starter code
123 Postman collection for this section
124 Where do users pay
125 After payment receiving order data
126 Creating our OrderModel
127 Many-to-many relationships with SQLAlchemy
128 Using the Association Object in our Resourcee

Bonus section
129 Conclusion of the course
130 Bonus lecture next steps and other resources