Autoplay
Autocomplete
Previous Lesson
Complete and Continue
REST APIs with Flask and Python
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 (1:01)
Access the code for this section here
Variables in Python (8:26)
String formatting in Python (6:26)
Getting user input (5:16)
Writing our first Python app (3:19)
Lists, tuples, and sets (6:31)
Advanced set operations (4:39)
Booleans in Python (4:59)
If statements (8:17)
The 'in' keyword in Python (2:02)
If statements with the 'in' keyword (8:18)
Loops in Python (11:07)
List comprehensions in Python (7:24)
Dictionaries (8:31)
Destructuring variables (8:28)
Functions in Python (10:41)
Function arguments and parameters (7:40)
Default parameter values (3:54)
Functions returning values (7:19)
Lambda functions in Python (7:52)
Dictionary comprehensions (4:01)
Unpacking arguments (10:24)
Unpacking keyword arguments (8:44)
Object-Oriented Programming in Python (15:52)
Magic methods: __str__ and __repr__ (6:25)
@classmethod and @staticmethod (14:03)
Class inheritance (8:32)
Class composition (6:08)
Type hinting in Python 3.5+ (5:08)
Imports in Python (9:33)
Relative imports in Python (8:52)
Errors in Python (12:47)
Custom error classes (5:04)
First-class functions (7:52)
Simple decorators in Python (7:12)
The 'at' syntax for decorators (3:32)
Decorating functions with parameters (2:24)
Decorators with parameters (4:50)
Mutability in Python (6:03)
Mutable default parameters (and why they're a bad idea) (4:27)
Your first REST API
What is an API?
Installing Flask (1:58)
Access the code for this section here
Your first Flask application (9:54)
HTTP Verbs (10:03)
REST Principles (7:42)
Creating our application endpoints (8:25)
Returning a list of stores (7:00)
Implementing other endpoints (8:48)
Calling the API from JavaScript (6:39)
Using Postman for API testing (12:08)
Conclusion of this section (0:50)
Flask-RESTful for more efficient development
Virtualenvs and setting up Flask-RESTful (8:05)
Access the code for this section here
Your first Flask-RESTful app (10:39)
Test-first API design—what is that? (10:48)
Creating our Item Resource (10:33)
The ItemList and creating Items (7:16)
Improving code and error control (7:16)
Authentication and logging in—part 1 (12:17)
Authentication and logging in—part 2 (7:18)
DELETE to delete Items (4:33)
PUT to create or update Items (4:26)
Advanced request parsing with Flask-RESTful (6:16)
Optimising our final code and request parsing (3:53)
Storing resources in a SQL database
Setting up our project (3:36)
Access the code for this section here
Running a SQLite database and interacting with it from Python (13:15)
Logging in and retrieving Users from a database (16:42)
Signing up and writing Users to a database (13:31)
Preventing duplicate usernames when signing users up (2:57)
Retrieving our Item resources from a database (8:59)
Writing our Item resources to a database (13:18)
Deleting our Item resources from the database (4:01)
Refactoring insertion of items (5:00)
The PUT method with database interaction (4:59)
Retrieving many items from the database (6:42)
Advanced Flask-JWT Configuration
Simplifying storage with Flask-SQLAlchemy
Access the code for this section here
Setting up this section's project (6:08)
Improving the project structure and maintainability (4:59)
Creating User and Item models (23:05)
Verifying the app works after our changes (5:19)
Advanced Postman: environments and tests (11:20)
Errata: small mistake in code in the next video
Telling SQLAlchemy about our tables and columns (10:45)
Implementing the ItemModel using SQLAlchemy (15:16)
Implementing the UserModel using SQLAlchemy (9:42)
Easily displaying the ItemList resource with SQLAlchemy (5:07)
No more creating tables manually—telling SQLAlchemy to create tables (2:39)
Creating a new model: StoreModel (12:33)
Creating the Store Resource (9:46)
Final testing of this section's API (5:59)
Git—version control
Installing Git on Mac and Windows (4:12)
What is a Git repository? (5:27)
The Git workflow—part 1 (4:31)
The Git workflow—part 2, including GitHub (5:17)
Using SSH keys for security (6:53)
The README file (5:25)
Deploying Flask apps to Heroku
Access the code for this section here
What is Heroku? (6:33)
Getting our code into GitHub (7:47)
Setting up Heroku for Flask (4:28)
Adding the required files to the project (10:49)
Logs in Heroku and troubleshooting errors (9:01)
Testing the deployed API with Postman (3:56)
Adding PostgreSQL to our Heroku app (9:20)
Working with Git and automatic deploys (6:30)
Deploying Flask apps to our own server
Setting up a DigitalOcean server (11:57)
Want to deploy to AWS?
Installing PostgreSQL in Ubuntu 16.04 (8:09)
Creating a UNIX user in Ubuntu 16.04 (7:45)
Setting up our new user with PostgreSQL permissions (9:06)
Setting up nginx and our REST API (19:34)
Setting up uWSGI to run our REST API (24:04)
Testing our API to make sure everything works (7:20)
Security in your REST APIs
Welcome to this section
Security in REST APIs e-book
Getting our domain name (6:14)
Setting up Cloudflare (8:26)
What is DNS? (5:03)
Setting our DNS records (7:37)
Verifying everything works—this is important! (1:26)
Creating our SSL certificate in Cloudflare (2:42)
Configuring nginx for SSL (12:00)
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! (11:25)
Creating a User Resource for testing (7:02)
Testing our new Resource with Postman (5:38)
Logging in with Flask-JWT-Extended (17:20)
Testing the login with Postman (2:59)
Adding JWT Claims (8:35)
Getting the JWT identity in and endpoint and @jwt_optional (5:31)
What is a fresh token? (6:49)
Performing token refresh in our REST API (8:24)
Requiring a fresh token in an endpoint (2:43)
Customizing Flask-JWT-Extended callbacks and responses (7:19)
Blacklisting with Flask-JWT-Extended (5:55)
Logging users out in our REST API (6:32)
E-book: complete review of the API so far
Flask-JWT-Extended further reading
The README file
Lesson content locked
If you're already enrolled,
you'll need to login
.
Enroll in Course to Unlock