Python API Development Literacy (Beginner Level)

  • 22m
  • 22 questions
The Python API Development Literacy (Beginner Level) benchmark will measure your understanding of the mechanics of HTTP requests and responses using the HTTPX library. You will be evaluated on your ability to install the Flask-RESTful library, implement a simple API server to respond to requests, and develop handlers for GET and POST requests for a Python application using the molten framework. A learner who scores high on this benchmark demonstrates that they have the skills to handle requests and responses for APIs in Flask and molten frameworks.

Topics covered

  • access data in the request body of an API server
  • build a Molten app that takes in URL parameters
  • configure endpoints to facilitate using the same resource for multiple application routes
  • create a basic REST API to return JSON data
  • create a .TOML file that contains settings for a Molten app and read in that file using a TOMLSettingsComponent instance
  • define and submit a POST request containing JSON and binary data
  • demonstrate how URL path parameters work using the Flask-RESTful library
  • develop a basic Molten app with a single route that takes in a query parameter with a QueryParam instance and returns a value based on that parameter
  • develop some basic tests to verify the behavior of your Molten application
  • identify the different forms of responses that may be contained within an HTTPX Response object
  • implement methods to respond to GET, POST, PUT, and DELETE HTTP requests using the Flask-RESTful library
  • install the curl utility and Flask-RESTful Python library and set up a virtual environment on a Windows machine
  • load the settings defined in a JSON file in your file system into a Molten SettingsComponent instance
  • make basic GET request calls using HTTPX and examine the Response objects that are returned
  • recognize the different types of HTTP requests that can be invoked with HTTPX and describe the use cases for each of them
  • retrieve and work with binary data, such as images using HTTPX
  • submit data to a remote server using a POST request with HTTPX
  • submit HTTP GET requests with one or more parameters using HTTPX
  • submit JSON data in a POST request and verify that your schema definitions work correctly
  • use a Molten Schema instance to validate the POST data submitted to your app
  • use the dump_schema function to convert a schema object to a Python dictionary
  • use the load_schema function to convert a Python dictionary to a schema object and use the is_schema function to check whether an object is a schema instance