Flask-RESTful: Parsing & Validating Input Requests


Overview/Description
Expected Duration
Lesson Objectives
Course Number
Expertise Level



Overview/Description

A major benefit when building REST APIs in Flask-RESTful, is unlimited access to use the built-in request parser any time you want to parse and validate input arguments to your API server. Python developers will find the flexibility and extensibility of Flask-RESTful very useful.

In this course, you'll learn to effectively use a request parser object to parse and extract input arguments from user requests. You'll validate input arguments using the right configuration before setting up custom help messages for the parser arguments.

Next, you'll examine how your request parser can look beyond the request body - in the query string, cookies, and other locations, for input arguments. You'll explore how to inherit from an existing parser object and how to modify a parser to suit your needs.

Finally, you'll investigate how to make errors returned by the parser more user-friendly by choosing to bundle them together to return as a group in a JSON response.



Expected Duration (hours)
1.1

Lesson Objectives

Flask-RESTful: Parsing & Validating Input Requests

  • discover the key concepts covered in this course
  • use a request parser to parse input arguments sent in a request body
  • configure required parameters using the Flask-RESTful request parser
  • specify custom error messages for missing arguments using the Flask-RESTful library
  • implement methods to respond to GET, POST, PUT, and DELETE HTTP requests using the Flask-RESTful library
  • configure a Flask-RESTful request parser to parse arguments from different locations
  • use the copy method to inherit from a predefined request parser via Flask-RESTful
  • use the Flask-RESTful library to bundle parsing errors
  • summarize the key concepts covered in this course
  • Course Number:
    it_pywsfrdj_02_enus

    Expertise Level
    Intermediate