Cademy logoCademy Marketplace

Course Images

REST APIs with Flask and Python in 2023

REST APIs with Flask and Python in 2023

🔥 Limited Time Offer 🔥

Get a 10% discount on your first order when you use this promo code at checkout: MAY24BAN3X

  • 30 Day Money Back Guarantee
  • Completion Certificate
  • 24/7 Technical Support

Highlights

  • On-Demand course

  • 12 hours

  • All levels

Description

This course will show you how to create simple, intermediate, and advanced REST APIs for authentication, deployment, caching, and much more. You will also cover essential technologies such as Flask and popular extensions such as Flask-Smorest, Flask-JWT-Extended, and Flask-SQLAlchemy; we will dive right into developing complete, solid, production-ready REST APIs.

A REST API is an application that accepts data from clients and returns data back. For example, a REST API could accept text data from the client, such as a username and password, and return whether that is a valid user in the database. The cover takes you through a Python refresher that will take you from the very basics to some of the most advanced features of Python-that's all the Python you need to complete the course. Further, you will move on to create resource-based, production-ready REST APIs using Python, Flask, and popular Flask extensions.Learn to handle secure user registration and authentication with Flask. Learn to use SQLAlchemy and Flask-SQLAlchemy to easily and efficiently store resources in a database; understand the complex intricacies of deployments of Flask REST APIs. You will also investigate essential technologies such as Git and database migrations with Alembic. Together, we will develop a REST API that not only allows clients to authenticate but also store and retrieve any data you want from a database. Learning this will help you develop any REST API that you need for your own projects! By the end of the course, you will have understood and developed your skills in web and REST API development with Python, Flask, and Docker. All resources and code files are placed here: https://github.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023

What You Will Learn

Connect your web or mobile applications to databases and servers through REST APIs
Create secure and reliable REST APIs
Understand how web applications interact with each other
Handle user authentication with advanced features such as token refresh
Handle logouts in your REST APIs with JWT blacklisting
Develop professional-grade REST APIs with expert guidance

Audience

This course is for students and software developers who want to enhance their mobile and web applications using server-side technologies or expand their skillset by learning how to develop professional-grade REST APIs. Those looking to explore Python for catering to web services specifically will also find this course useful. Familiarity with the basics of programming and knowledge of the Python programming language will help you grasp the concepts quickly.

Approach

With the help of engaging activities, this course will guide you in creating simple, intermediate, and advanced REST APIs for authentication, deployments, caching, and much more.

Key Features

Handle secure user registration and authentication with Flask * Get to grips with the development of resource-based, production-ready REST APIs * Understand deployment complexities and the performance of Flask REST APIs

Github Repo

https://github.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023

About the Author

Jose Salvatierra Fuentes

Jose, a passionate educator in the realm of coding and software development, has dedicated over 7 years to teaching online. He founded Teclado with a vision to democratize software development education, striving to ensure comprehensive understanding for his students. His approach makes learning coding a clear, rewarding journey, connecting the dots that once seemed obscure. Specializing in Python and JavaScript, Jose excels in web and backend development. He's proficient in various libraries and frameworks, including Flask, React, React Native, and AngularJS. His expertise extends to working with UNIX systems, MongoDB, PostgreSQL, and crafting advanced system architectures. Jose's commitment is to make the learning process both efficient and enjoyable, guiding students to mastery in software development.

Course Outline

1. Welcome!

1. Promotion

This video introduces you to the author and presents a preview of the course objectives.


2. A Full Python Refresher

1. Introduction to This Section

This video presents an introduction to this section.

2. Variables in Python

This video focuses on the variables in Python.

3. Solution to Coding Exercise: Variables

The video presents a solution to the "Variables" Python coding exercise.

4. String Formatting in Python

This video demonstrates how to format strings in Python.

5. Getting User Input

This video shows how to get user input.

6. Writing Your First Python App

This video explains how to write your first Python app.

7. Lists, Tuples, and Sets

This video explains three essential data structures in Python: lists, tuples, and sets.

8. Advanced Set Operations

This video discusses the advanced set operations, such as calculating items that are in two sets or items that are in one set but not in another.

9. Solution to Coding Exercise: Lists, Tuples, and Sets

The video presents the solution to the "Lists, Tuples, and Sets" Python coding exercise.

10. Booleans in Python

This video explains how to use Booleans in Python.

11. If Statements

This video explains the "if" statements used in Python.

12. The "in" Keyword in Python

This video explains the "in" keyword in Python.

13. If Statements with the "in" Keyword

This video explains how to use the "if" statements with the "in" keyword.

14. Loops in Python

This video explains the two different types of loops used in Python: the for loop and while loop statements.

15. Solution to Coding Exercise: Flow Control

This video provides the solution to the "Flow Control" Python coding exercise.

16. List Comprehensions in Python

This video explains the list comprehensions in Python.

17. Dictionaries

This video explains how useful dictionaries are in Python.

18. Destructuring Variables

This video demonstrates how to destruct variables in Python.

19. Functions in Python

This video explains the functions in Python with the help of some examples.

20. Function Arguments and Parameters

This video focuses on function arguments and parameters.

21. Default Parameter Values

This video explains the default parameter values.

22. Functions Returning Values

This video explains how functions return values.

23. Solution to Coding Exercise: Functions

This video provides the solution to the "Functions" Python coding exercise.

24. Lambda Functions in Python

This video explores the Lambda functions in Python.

25. Dictionary Comprehensions

This video explains the dictionary comprehensions in Python.

26. Solution to Coding Exercise: Dictionaries and Students

The video provides the solution to the "Dictionaries and Students" Python coding exercise.

27. Unpacking Arguments

This video explains how to unpack arguments.

28. Unpacking Keyword Arguments

This video demonstrates how to unpack keyword arguments.

29. Object-Oriented Programming in Python

This video explores object-oriented programming in Python.

30. Magic Methods: ..str.. and ..repr..

This video explains the magic methods of '..str..' and '..repr..'.

31. Solution to Coding Exercise: Classes and Objects

This video provides the solution to the "Classes and Objects" Python coding exercise.

32. @classmethod and @staticmethod

This video explains the @classmethod and @staticmethod methods.

33. Solution to Coding Exercise: @classmethod and @staticmethod

The video provides the solution to the "@classmethod and @staticmethod" Python coding exercise.

34. Class Inheritance

This video focuses on class inheritance.

35. Class Composition

This video explains class composition.

36. Type Hinting in Python 3.5+

This video explains type hinting in Python 3.5+.

37. Imports in Python

This video focuses on imports in Python.

38. Relative Imports in Python

This video explains relative imports in Python.

39. Errors in Python

This video focuses on errors in Python.

40. Custom Error Classes

This video focuses on custom error classes.

41. First-Class Functions

This video focuses on first-class functions.

42. Simple Decorators in Python

This video explains simple decorators in Python.

43. The "at" Syntax for Decorators

This video explains how to use the "at" syntax for decorators.

44. Decorating Functions with Parameters

This video shows how to use decorating functions with parameters.

45. Decorators with Parameters

This video explores advanced decorators in Python, which are the decorators that take arguments.

46. Mutability in Python

This video focuses on mutability in Python.

47. Mutable Default Parameters (and Why They Are a Bad Idea)

This video focuses on mutable default parameters and explains why they are a bad idea.


3. Your First REST API

1. Overview of the Project We Will Build

This video explains the overview of the project; how the API will receive requests from a client such as a web application or a mobile app and it will respond with some data.

2. Initial Setup for a Flask App

This video demonstrates how to set up the project for REST API.

3. Your First REST API Endpoint

This video explains how to write your first REST API endpoint by defining where to store the data.

4. What Is JSON?

This video explains what JSON is and its importance.

5. How to Interact with and Test Your REST API

This video explains how clients can interact with the REST API.

6. How to Create Stores in Our REST API

This video demonstrates how to create a store in our REST API.

7. How to Create Items in Each Store

This video explains creating items within a store.

8. How to Get a Specific Store and Its Items

This video explains how to get a specific store and the store items.


4. Introduction to Docker

1. What Are Docker Containers and Images?

This video introduces you to Docker, containers, images, and a little bit about how Docker works.

2. How to Run a Flask App in a Docker Container

This video explains how to run the Flask app in a Docker container.


5. Flask-Smorest for More Efficient Development

1. Data Model Improvements for Our API

This video explains a few improvements to the data store in our API.

2. General Improvements to Our First REST API

This video shows you a couple of improvements in the REST API and adds error handling.

3. New Endpoints for Our First REST API

This video explains new endpoints for our first REST API.

4. How to Run the API in Docker with Automatic Reloading and Debug Mode

This video explains how to run the API in Docker with automatic reloading and debug mode.

5. How to Use Blueprints and MethodViews in Flask

This video demonstrates how to use Blueprints and MethodViews in Flask.

6. How to Write Marshmallow Schemas for Our API

This video explains how to write Marshmallow schemas for our API.

7. How to Perform Data Validation with Marshmallow

This video explains how to perform data validation with Marshmallow.

8. Decorating Responses with Flask-Smorest

This video explains decorating responses with Flask-Smorest.


6. Store Data in DQL Database with SQLAlchemy

1. Overview and Why Use SQLAlchemy

This video explains why to use SQLAlchemy.

2. How to Code a Simple SQLAlchemy Model

The video explains how to code a simple SQLAlchemy model.

3. How to Write One-to-Many Relationships Using SQLAlchemy

This video demonstrates how to write one-to-many relationships using SQLAlchemy.

4. How to Configure Flask-SQLAlchemy with Your Flask App

This video demonstrates how to configure Flask-SQLAlchemy with your Flask app.

5. How to Insert Data into a Table Using SQLAlchemy

This video explores how to insert data into a table using SQLAlchemy.

6. How to Find Models in the Database by ID or Return a 404

This video explains how to find models in the database by ID.

7. How to Update Models with SQLAlchemy

This video explains how to update models with SQLAlchemy.

8. How to Retrieve List of All Models

This video explains how to retrieve a list of all models.

9. How to Delete Models with SQLAlchemy

This video explains how to delete models with SQLAlchemy.

10. Conclusion of This Section

This video concludes the section by doing a quick review of everything that you have learned in this section.


7. Many-to-Many Relationships with SQLAlchemy

1. Changes in This Section

This video explains many-to-many relationships with SQLAlchemy.

2. One-to-Many Relationship Between Stores and Tags

This video explains one-to-many relationship between stores and tags.

3. Many-to-Many Relationship Between Items and Tags

This video explains many-to-many relationships between items and tags.


8. User Authentication with Flask-JWT-Extended

1. Who Uses the JWT?

This video explains who uses the JWT.

2. How to Set Up Flask-JWT-Extended with Our App

This video explains how to set up Flask-JWT-Extended with our app.

3. Coding the User Model and Schema

This video explains the user model and schema.

4. How to Add a Register Endpoint to the REST API

This video demonstrates how to add a register endpoint to the REST API.

5. How to Add a Login Endpoint to the REST API

This video focuses on how to add a login endpoint to the REST API.

6. Protect Endpoints by Requiring a JWT

This video explains how to protect endpoints by requiring a JWT.

7. JWT Claims and Authorization

This video explains JWT claims and authorization.

8. How to Add Logout to the REST API

This video explains how to add logout to the REST API.

9. Request Chaining with Insomnia

This video explains request chaining with Insomnia.

10. Token Refreshing with Flask-JWT-Extended

This video explains token refreshing with Flask-JWT-Extended.


9. Database Migrations with Alembic and Flask-Migrate

1. How to Add Flask-Migrate to Our Flask App

This video explains how to add Flask-Migrate to our Flask app.

2. Initialize Your Database with Flask-Migrate

This video explains how to initialize your database with Flask-Migrate.

3. Change SQLAlchemy Models and Generate a Migration

This video explains how to change SQLAlchemy models and generate a migration.

4. Manually Review and Modify Database Migrations

This video explains how to manually review and modify database migrations.


10. Git Crash Course

1. What Are Git Repositories and Commits?

This video explains Git repositories and commits.

2. Initialize a Git Repository for Our Project

This video demonstrates how to initialize a Git repository.

3. Writing Markdown for Documents and Commits

This video explains how to write markdowns for documents and commits.

4. Remote Repositories and How to Use Them

This video explains repositories and how to use them.

5. Git Branches and Merging

This video explains Git branches and merging.

6. Merge Conflicts and How to Resolve Them

This video demonstrates how to merge conflicts and how to resolve them.

7. Overview of the Final E-Book Chapters

This video explains an overview of the final e-book chapters.


11. Deployments with Render.com

1. Creating a Render.com Web Service

This video presents a recap of the code and explains a few changes.

2. How to Run Flask with gunicorn in Docker

This video explains how to run our Docker container with a more performant solution than the Flask built-in development server.

3. Get a Deployed PostgreSQL Database

This video explains how to get a deployed PostgreSQL database.

4. Use PostgreSQL Locally and in Production

This video demonstrates how to use PostgreSQL locally and in production.

5. Test the Finished Production App

This video explains how to test the finished production app.


12. Task Queues with rq and Sending Emails

1. How to Send Emails with Python and Mailgun

This video explains how to start sending emails through our REST API.

2. How to Send Emails When Users Register

This video explains how to send email when a user register.

3. What Is a Task Queue and Setting Up a Redis Database

This video explains task queues and how to set up a Redis database.

4. How to Populate and Consume the Task Queue with rq

This video demonstrates how to populate and consume the task queue with rq.

5. How to Process Background Tasks with the rq Worker

This video explains how to process background tasks with rq worker.

6. How to Send HTML Emails Using Mailgun and Python

This video demonstrates how to send HTML emails using Mailgun and Python.

7. How to Deploy a Background Worker to render.com

This video explains how to deploy the webservice and the rq background worker to render.com.

Course Content

  1. REST APIs with Flask and Python in 2023

About The Provider

Packt
Packt
Birmingham
Founded in 2004 in Birmingham, UK, Packt’s mission is to help the world put software to work in new ways, through the delivery of effective learning and i...
Read more about Packt

Tags

Reviews