<<Download>> Download Microsoft Word Course Outline Icon Word Version Download PDF Course Outline Icon PDF Version

Build REST APIs with Python and Flask

Duration

3 days

Overview

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

Prerequisites

All students should be able to comfortably write Python scripts using basic data types, program structures, and the standard Python library.

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.

Software Requirements

Students will need a free, personal GitHub account to access the courseware. Students will need permission to install Python and Visual Studio Code on their computers. Also, students will need permission to install Python Packages and Visual Studio Extensions. If students are unable to configure a local environment, a cloud-based environment can be provided.

Outline

  • Development Environment (Very Quick Overview)
    • Configure VS Code for Python development
    • Code Reformatting with Black
    • Debugging Python Scripts with VS Code
  • Quick 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
  • Quick Review of Databases
    • What is a Database?
    • Connecting to a Database
    • Query data from a Database
    • Modify data in a Database
  • Overview of Python Web Frameworks
    • Django
    • Flask
    • FastAPI
  • Representational State Transfer
    • What is REST?
    • HTTP Verbs and their use in REST
    • OpenAPI
    • JSON
    • Swagger
  • Building a REST API with Flask
    • 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
<<Download>> Download Microsoft Word Course Outline Icon Word Version Download PDF Course Outline Icon PDF Version