Skip to main content

Build REST APIs with Python and Flask and RESTX

Executive Summary

This course empowers Python developers to master REST API development using Flask and RestX. Gain hands-on skills in HTTP, JSON, and database integration with PostgreSQL or SQL Server. Build, document, and secure APIs with JWT, implement async routes, and use modern frameworks and tools. Learn to deploy robust APIs to the cloud—ideal for programmers looking to rapidly advance their backend expertise.

Productive tech team collaborating

Description

  • The Build REST APIs with Python and Flask and RestX course is designed for computer programming professionals seeking to understand the benefits and principles of a REST API.
  • Participants will review the HTTP protocol and its application to REST APIs, and explore how to connect to a PostgreSQL or SQL Server database with Python and SQLAlchemy.
  • The curriculum includes a review of Python Web Framework options and an overview of tools commonly used in REST API development.
  • Learners will gain hands-on experience in building a REST API using Python, Flask, and RestX REST API framework.
  • The course concludes with a review of options for deploying a REST API to the cloud, equipping learners with the skills to develop and deploy robust REST APIs.

Objectives

  • Understand the benefits and principles of a REST API
  • Review the HTTP protocol and learn how it applies to REST APIs
  • Explore how to connect to a PostgreSQL or SQL Server database with Python and SQLAlchemy
  • Review Python Web Framework options
  • Learn about tools commonly used when developing REST APIs
  • Build a REST API using the Python, Flask, and RestX REST API framework
  • Review options for deploying a REST API to the cloud

Duration

24 hours of intensive training with live instruction delivered over three to four days to accommodate varied scheduling needs.

Request Information

Course Outline

Development Environment
  • Configure VS Code or PyCharm for Python development
  • Code Linting and Reformatting with Ruff and MyPy
  • Debugging Python Scripts with VS Code or PyCharm
Review of HTTP and URLs
  • What is HTTP?
  • What are HTTP Verbs?
  • What are the parts of a URL?
  • Path Parameters
  • Query String Parameters
  • Common HTTP Headers
  • Common HTTP Status Codes
Review of Databases
  • What is a Database?
  • Database CLI & GUI Clients
  • Database Code Libraries
  • Connecting to a Database
  • Query data from a Database
  • Modify data in a Database
Python Web Frameworks
  • Overview of Django
  • Overview of Flask
  • Overview of FastAPI
Representational State Transfer
  • What is REST?
  • What is a Resource?
  • HTTP Verbs and their use in REST
  • OpenAPI / Swagger
  • JSON
  • REST Clients
Building a REST API with Flask
  • Flask as a REST API
  • Flask + RESTX REST API Framework
  • Create an Application
  • Define a Hello World Route
  • Configure a Path Parameter
  • Configure a Query String Parameter
  • Reading Request Body
  • Writing a Response Body
  • Handling Cookies
  • Handle Errors
  • Return Specific Status Codes
  • Asynchronous Routes
  • Serving Static Files
Database Access
  • Connecting to a Database
  • Querying Data
  • Modifying Data
  • Transactions
  • SQLAlchemy
  • Running a Database with Docker
Document and Version APIs
  • Swagger
  • OpenAPI
  • Versioning
Security
  • Secure a REST API with JWT
  • Configure CORS
Cloud Deployment
  • Microservice Architecture
  • REST API Containerization
  • Running Server-Less in Azure

Prerequisites

  • All students should be able to confidently write Python scripts utilizing basic data types, control structures, and the standard Python library.
  • Students should have a basic understanding of HTTP and web development concepts.

Training Materials

All students receive comprehensive courseware covering all topics in the course. Courseware is distributed via GitHub in the form of documentation and extensive code samples. Students practice the topics covered through challenging hands-on lab exercises. Students will need a free, personal GitHub account to access the courseware. Students will need permission to install Python and Editor (Visual Studio Code or PyCharm) on their computers. Also, students will need permission to install Python Packages and Visual Studio Code Extensions. If students are unable to configure a local environment, a cloud-based environment can be provided.