REST APIs with Flask and Python [Video]

REST APIs with Flask and Python [Video]

Jose Salvatierra

Build professional REST APIs with Python, Flask, Flask-RESTful, and Flask-SQLAlchemy
Mapt Subscription
FREE
$29.99/m after trial
Video
$93.50
RRP $109.99
Save 14%
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$93.50
$29.99p/m after trial
RRP $109.99
Subscription
Video
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Video Details

ISBN 139781788621526
Course Length13 hours 43 minutes

Video Description

Are you tired of boring, outdated, incomplete, or incorrect tutorials? I say no more to copy-pasting code that you don’t understand. Welcome to one of the best resources online on creating REST APIs. I'm Jose, and I'm a software engineer; here to help you truly understand and develop your skills in web and REST API development with Python. Production-ready REST APIs. This course will guide you in creating simple, intermediate, and advanced REST APIs including authentication, deployments, caching, and much more. We'll start with a Python refresher that will take you from the very basics to some of the most advanced features of Python—for you to never be lost or confused. Using Flask and popular extensions Flask-RESTful, Flask-JWT, and Flask-SQLAlchemy we will dive right into developing complete, solid, production-ready REST APIs. We will also look into essential technologies Git, Heroku, nginx, and Varnish. I pride myself in providing excellent support and feedback to every single student. I am always available to guide you personally, and answer questions for your benefit.Don't wait, and sign up today to take another step toward web services mastery!I'll see you on the inside.

Style and Approach

This course will guide you in creating simple, intermediate, and advanced REST APIs including authentication, deployments, caching, and much more.

Table of Contents

Welcome!
Welcome to the course
A Full Python Refresher
Introduction to this section
Variables in Python
Solution to coding exercise: Variables
Methods in Python
Solution to coding exercise: Methods
Lists, tuples, and sets
List, tuple, and set operations
Advanced set operations
Solution to coding exercise: Lists, tuples, sets
Loops in Python
If statements
Solution to coding exercise: Flow control
A programming exercise for you
List comprehension
Dictionaries
Are dictionaries "things"?
Solution to coding exercise: Dictionaries
Objects in Python
A Student example
Solution to coding exercise: Classes and objects
@classmethod and @staticmethod
Solution to coding exercise: @classmethod and @staticmethod
Inheritance in Object-Oriented Programming
*args and **kwargs
Passing functions as arguments
Decorators in Python
Advanced decorators
Conclusion of this section
Your first REST API
Introduction to this section
Installing Flask
Your first Flask application
HTTP Verbs
REST Principles
Creating our application endpoints
Returning a list of stores
Implementing other endpoints
Calling the API from JavaScript
Using Postman for API testing
Conclusion of this section
Flask-RESTful for more efficient development
Welcome to this section
Virtualenvs and setting up Flask-RESTful
Your first Flask-RESTful app
Test-first API design—what is that?
Creating our Item Resource
The ItemList and creating Items
Improving code and error control
Authentication and logging in—part 1
Authentication and logging in—part 2
DELETE to delete Items
PUT to create or update Items
Advanced request parsing with Flask-RESTful
Optimising our final code and request parsing
Conclusion of this section
Storing resources in a SQL database
Welcome to this section
Setting up our project
Running a SQLite database and interacting with it from Python
Logging in and retrieving Users from a database
Signing up and writing Users to a database
Preventing duplicate usernames when signing users up
Retrieving our Item resources from a database
Writing our Item resources to a database
Deleting our Item resources from the database
Refactoring insertion of items
The PUT method with database interaction
Retrieving many items from the database
Conclusion of this section
Simplifying storage with Flask-SQLAlchemy
Welcome to this section!
Setting up this section's project
Improving the project structure and maintainability
Creating User and Item models
Verifying the app works after our changes
Advanced Postman: environments and tests
Telling SQLAlchemy about our tables and columns
Implementing the ItemModel using SQLAlchemy
Implementing the UserModel using SQLAlchemy
Easily displaying the ItemList resource with SQLAlchemy
No more creating tables manually—telling SQLAlchemy to create tables
Creating a new model: StoreModel
Creating the Store Resource
Final testing of this section's API
Conclusion of this section
Git—version control
Welcome to this section
Installing Git on Mac and Windows
What is a Git repository?
The Git workflow—part 1
The Git workflow—part 2, including GitHub
Using SSH keys for security
The README file
Conclusion of this section
Deploying Flask apps to Heroku
Welcome to this section
What is Heroku?
Getting our code into GitHub
Setting up Heroku for Flask
Adding the required files to the project
Logs in Heroku and troubleshooting errors
Testing the deployed API with Postman
Adding PostgreSQL to our Heroku app
Working with Git and automatic deploys
Conclusion of this section
Deploying Flask apps to our own server
Welcome to this section
Setting up a DigitalOcean server
Installing PostgreSQL in Ubuntu 16.04
Creating a UNIX user in Ubuntu 16.04
Setting up our new user with PostgreSQL permissions
Setting up nginx and our REST API
Setting up uWSGI to run our REST API
Testing our API to make sure everything works
Conclusion of this section
Security in your REST APIs
Getting our domain name
Setting up Cloudflare
What is DNS?
Setting our DNS records
Verifying everything works—this is important!

What You Will Learn

  • Connect web or mobile applications to databases and servers via REST APIs
  • Create secure and reliable REST APIs which include authentication, logging, caching, and more
  • Understand the different layers of a web server and how web applications interact with each

Authors

Table of Contents

Welcome!
Welcome to the course
A Full Python Refresher
Introduction to this section
Variables in Python
Solution to coding exercise: Variables
Methods in Python
Solution to coding exercise: Methods
Lists, tuples, and sets
List, tuple, and set operations
Advanced set operations
Solution to coding exercise: Lists, tuples, sets
Loops in Python
If statements
Solution to coding exercise: Flow control
A programming exercise for you
List comprehension
Dictionaries
Are dictionaries "things"?
Solution to coding exercise: Dictionaries
Objects in Python
A Student example
Solution to coding exercise: Classes and objects
@classmethod and @staticmethod
Solution to coding exercise: @classmethod and @staticmethod
Inheritance in Object-Oriented Programming
*args and **kwargs
Passing functions as arguments
Decorators in Python
Advanced decorators
Conclusion of this section
Your first REST API
Introduction to this section
Installing Flask
Your first Flask application
HTTP Verbs
REST Principles
Creating our application endpoints
Returning a list of stores
Implementing other endpoints
Calling the API from JavaScript
Using Postman for API testing
Conclusion of this section
Flask-RESTful for more efficient development
Welcome to this section
Virtualenvs and setting up Flask-RESTful
Your first Flask-RESTful app
Test-first API design—what is that?
Creating our Item Resource
The ItemList and creating Items
Improving code and error control
Authentication and logging in—part 1
Authentication and logging in—part 2
DELETE to delete Items
PUT to create or update Items
Advanced request parsing with Flask-RESTful
Optimising our final code and request parsing
Conclusion of this section
Storing resources in a SQL database
Welcome to this section
Setting up our project
Running a SQLite database and interacting with it from Python
Logging in and retrieving Users from a database
Signing up and writing Users to a database
Preventing duplicate usernames when signing users up
Retrieving our Item resources from a database
Writing our Item resources to a database
Deleting our Item resources from the database
Refactoring insertion of items
The PUT method with database interaction
Retrieving many items from the database
Conclusion of this section
Simplifying storage with Flask-SQLAlchemy
Welcome to this section!
Setting up this section's project
Improving the project structure and maintainability
Creating User and Item models
Verifying the app works after our changes
Advanced Postman: environments and tests
Telling SQLAlchemy about our tables and columns
Implementing the ItemModel using SQLAlchemy
Implementing the UserModel using SQLAlchemy
Easily displaying the ItemList resource with SQLAlchemy
No more creating tables manually—telling SQLAlchemy to create tables
Creating a new model: StoreModel
Creating the Store Resource
Final testing of this section's API
Conclusion of this section
Git—version control
Welcome to this section
Installing Git on Mac and Windows
What is a Git repository?
The Git workflow—part 1
The Git workflow—part 2, including GitHub
Using SSH keys for security
The README file
Conclusion of this section
Deploying Flask apps to Heroku
Welcome to this section
What is Heroku?
Getting our code into GitHub
Setting up Heroku for Flask
Adding the required files to the project
Logs in Heroku and troubleshooting errors
Testing the deployed API with Postman
Adding PostgreSQL to our Heroku app
Working with Git and automatic deploys
Conclusion of this section
Deploying Flask apps to our own server
Welcome to this section
Setting up a DigitalOcean server
Installing PostgreSQL in Ubuntu 16.04
Creating a UNIX user in Ubuntu 16.04
Setting up our new user with PostgreSQL permissions
Setting up nginx and our REST API
Setting up uWSGI to run our REST API
Testing our API to make sure everything works
Conclusion of this section
Security in your REST APIs
Getting our domain name
Setting up Cloudflare
What is DNS?
Setting our DNS records
Verifying everything works—this is important!

Video Details

ISBN 139781788621526
Course Length13 hours 43 minutes
Read More

Read More Reviews

Recommended for You

RESTful Services with ASP.NET Web API [Video] Book Cover
RESTful Services with ASP.NET Web API [Video]
$ 84.99
$ 72.25
Taming Big Data with Apache Spark and Python - Hands On! [Video] Book Cover
Taming Big Data with Apache Spark and Python - Hands On! [Video]
$ 79.99
$ 68.00
Data Science and Machine Learning with Python - Hands On! [Video] Book Cover
Data Science and Machine Learning with Python - Hands On! [Video]
$ 98.99
$ 84.15
Web API Development with Flask [Video] Book Cover
Web API Development with Flask [Video]
$ 74.99
$ 63.75
RESTful Web API Design with Node.js - Second Edition [Video] Book Cover
RESTful Web API Design with Node.js - Second Edition [Video]
$ 124.99
$ 106.25
Architectural Patterns and Best Practices with Python [Video] Book Cover
Architectural Patterns and Best Practices with Python [Video]
$ 124.99
$ 106.25