Molten Framework: Building HTTP APIs

Molten 1.0    |    Beginner
  • 15 videos | 1h 48m 38s
  • Includes Assessment
  • Earns a Badge
Rating 3.7 of 3 users Rating 3.7 of 3 users (3)
This course introduces you to a breadth of features available in the Molten framework to help you build HTTP APIs. You'll begin by creating a virtual environment, installing Molten and various other libraries such as Pytest to test out your Molten apps, and installing Gunicorn to serve your apps. You'll then move on to creating REST APIs using the Molten framework. You'll create a very basic REST API with only one route that maps to a function and the API to process an HTTP GET request. You'll also explore the use of a QueryParam object to handle query parameters passed in an HTTP request. You'll next test your Molten APIs using Pytest by writing some simple tests to ensure an HTTP 200 status code is returned when a correct request is sent to the server and an error code is returned with the response otherwise. You'll also learn how these tests can be executed and how to analyze their outputs. You'll learn about the processing of POST requests, how to ensure the validity of POST data using a Molten Schema instance, different ways to define a schema, and how to use a forward reference. You'll explore the built-in objects available in the Molten framework and how to pass in a plain Python dictionary containing settings for an app. Finally, you'll see how settings can be saved in an external JSON file and then imported into a Molten app and how to load settings defined within a TOML file.


  • Discover the key concepts covered in this course
    Create a virtual environment from which molten rest apis can be run and install various libraries such as molten, pytest, and jq
    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
    Build a molten app that takes in url parameters
    Define an integer url parameter and verify your app's behavior when it comes to handling such data types and develop a molten test with pytest
    Develop some basic tests to verify the behavior of your molten application
    Use a molten schema instance to validate the post data submitted to your app
    Submit json data in a post request and verify that your schema definitions work correctly
  • Use a forward reference to another schema within a schema definition
    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
    Use the dump_schema function to convert a schema object to a python dictionary
    Define the settings for your app by loading a dictionary into the molten settingscomponent
    Load the settings defined in a json file in your file system into a molten settingscomponent instance
    Create a .toml file that contains settings for a molten app and read in that file using a tomlsettingscomponent instance
    Summarize the key concepts covered in this course


  • 3m 7s
  • 6m
  • Locked
    3.  Building Our First Molten App
    9m 52s
  • Locked
    4.  Exploring Routes in a Molten App
    9m 27s
  • Locked
    5.  Using Data Types in Processing Functions
    5m 46s
  • Locked
    6.  Integrating Molten Apps with Pytest
    11m 2s
  • Locked
    7.  Validating POST Requests with Schemas
    10m 26s
  • Locked
    8.  Testing Schema Definitions
    7m 44s
  • Locked
    9.  Defining Schemas with Nested Data
    6m 47s
  • Locked
    10.  Validating Python Dictionaries
    6m 10s
  • Locked
    11.  Transforming Schemas to Python Dictionaries
    7m 21s
  • Locked
    12.  Working with a Settings Component
    8m 43s
  • Locked
    13.  Working with Settings from a JSON File
    7m 16s
  • Locked
    14.  Loading Settings from a TOML File
    6m 24s
  • Locked
    15.  Course Summary
    2m 35s


Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.

Digital badges are yours to keep, forever.


Rating 4.7 of 123 users Rating 4.7 of 123 users (123)
Rating 4.3 of 151 users Rating 4.3 of 151 users (151)
Rating 4.5 of 76 users Rating 4.5 of 76 users (76)