Autoplay
Autocomplete
Previous Lesson
Complete and Continue
Advanced REST APIs with Flask and Python
Introduction
Access the e-book for Section 1 here!
Our project and endpoints (5:44)
Reviewing the beginner course code (9:53)
Simplifying our error handling (1:48)
Refactoring our resources (4:12)
Should we have unique names? (4:21)
Adding basic type hinting (8:33)
Adding custom JSON type (6:45)
Using the current class as a type hint (3:13)
Using Black for code formatting (10:09)
Improving errors with constants (8:02)
@classmethods across the board (6:56)
Testing our API with Postman (9:20)
Serialization with Marshmallow
Serialization with marshmallow (8:45)
Deserialization with marshmallow (6:16)
Migrating from virtualenv to Pipenv (16:23)
Postman collection for this section
Using vanilla Marshmallow with the API (14:23)
Introduction to Flask-Marshmallow (13:29)
Adding items to our REST API (12:38)
Adding stores to our REST API (9:27)
Deduplicating error handling (4:19)
E-mail confirmations
Introduction to e-mail confirmation (5:36)
Postman collection for this section
Adding an activated property (3:28)
Activating users manually (6:00)
Telling users they are active (15:27)
Setting up Mailgun (3:12)
Sending e-mails with Mailgun (Part 1) (13:50)
Sending emails with Mailgun (Part 2) (3:43)
Creating our Mailgun library file (7:56)
Using .env files in Flask (5:48)
Adding more configuration to .env (1:52)
Error handling in Mailgun (9:10)
Advanced e-mail confirmation
Postman collection for this section
Creating the ConfirmationModel (15:30)
Changes in our UserModel (8:11)
Creating our ConfirmationResource (17:24)
Updating our UserResource (5:03)
Adding the last confirmation to the user schema (3:27)
Fixing our app.py (6:27)
Cross-resource dependencies are (generally) bad (5:02)
What are localisation and internationalisation? (11:40)
Storing strings in config files (4:12)
Creating a simple translation library (9:44)
Updating our resources to use translations (10:55)
Adding a new language to our API (5:23)
What is Flask-Babel? (6:11)
Common pitfalls and advice (3:56)
Postman documentation and tests
Postman collection for this section
Collection and request descriptions (4:07)
Recap of Postman environments (4:36)
JavaScript tests in Postman (14:07)
Running entire collections in Postman (15:34)
Adding example requests and responses (8:48)
Previewing our Postman documentation (0:35)
Publishing our documentation page (3:47)
More options for publishing documentation (6:27)
Image uploads
Postman collection for this section
Errata and code changes required
Installing Flask-Uploads (1:34)
Config files in Flask (16:41)
What are wsgi and Werkzeug? (12:06)
Creating our image helper library (16:56)
Creating our image schema (6:36)
Creating our image upload resource (9:10)
Trying out our image upload (8:22)
Retrieving and deleting images (9:59)
Another example: user avatars (10:58)
Adding the avatar resource (5:46)
Database migrations
Getting a PostgreSQL database (1:50)
What's in our starter code? (1:27)
Postman collection for this section
Connecting to our remote database (3:10)
Initialising Flask-Migrate and Alembic (6:32)
Creating our initial table structure (8:06)
Our first database migration (3:04)
Checking the Alembic script (important!) (6:21)
Adding a new column with migrations (2:01)
Problems that can happen while migrating (5:34)
A word of caution! (1:46)
Defining a SQLAlchemy naming convention (6:22)
When should you read documentation? (5:06)
Third party login with OAuth
Introduction to OAuth 2.0 (9:57)
What's in our starter code? (3:34)
Postman collection for this section
Creating a GitHub OAuth App (3:56)
Flask-OAuthlib (4:13)
Setting up our GitHub client (7:49)
Our GithubLogin resource (5:30)
What is Flask's g? (5:45)
What is a tokengetter? (10:45)
Finishing our GithubAuthorize resource (5:42)
Adding some error handling (2:14)
Setting user passwords (8:42)
Using url_for with Flask-RESTful (2:59)
Payments with Stripe
Setting up our Stripe account (6:00)
What's in our starter code? (4:29)
Postman collection for this section
Where do users pay? (6:43)
After payment: receiving order data (12:24)
Creating our OrderModel (11:12)
Many-to-many relationships with SQLAlchemy (10:26)
Using the Association Object in our Resourcee (16:36)
Charging orders with Stripe (10:29)
Calculating the amount and description (6:45)
Testing our OrderResource (4:12)
Creating a way to view existing orders (2:41)
When things go wrong: error handling in Stripe (4:26)
Security considerations in payments (3:11)
Using the Association Object in our Resourcee
Lesson content locked
If you're already enrolled,
you'll need to login
.
Enroll in Course to Unlock