8173  Reviews star_rate star_rate star_rate star_rate star_half

Python REST API Programming

This Python training course teaches experienced Python developers how to build REST APIs using the Python programming language. Attendees learn the essential concepts of REST APIs, the HTTP protocol,...

Read More
Course Code PYTH-264
Duration 3 days
Available Formats Classroom

This Python training course teaches experienced Python developers how to build REST APIs using the Python programming language. Attendees learn the essential concepts of REST APIs, the HTTP protocol, and standard data formats such as JSON. Since more REST APIs use databases, the class covers using PostgreSQL, SQL Server, or MongoDB (client choice) with Python as part of a REST API. To implement REST APIs, the FastAPI REST API framework is used (this can be swapped with Flask if Flask is preferred). This Python course also covers security and cloud deployment.

Skills Gained

  • Work with databases
  • Python Web Frameworks
  • Build a REST API with FastAPI
  • Secure a REST API with JWT

Prerequisites

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

Course Details

Training Materials

All Python training attendees receive courseware covering the topics in the class.

Software Requirements

  • Any Windows, Linux, or Mac OS X operating system
  • Standard Python 3.x or Anaconda Python 3.x
  • Visual Studio Code (other editors may be used)

Outline

  • Introduction
  • 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 FastAPI
    • 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
  • Middleware
  • Security
    • Secure a REST API with JWT
    • Configure CORS
  • Cloud Deployment
    • Microservice Architecture
    • REST API Containerization
    • Running Server-Less in Azure
  • Conclusion