Molten Framework: Building HTTP APIs
Molten 1.0
| Beginner
- 15 Videos | 1h 48m 38s
- Includes Assessment
- Earns a Badge
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.
WHAT YOU WILL LEARN
-
discover the key concepts covered in this coursecreate a virtual environment from which Molten REST APIs can be run and install various libraries such as Molten, Pytest, and JQdevelop 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 parameterbuild a Molten app that takes in URL parametersdefine an integer URL parameter and verify your app's behavior when it comes to handling such data types and develop a Molten test with pytestdevelop some basic tests to verify the behavior of your Molten applicationuse a Molten Schema instance to validate the POST data submitted to your appsubmit JSON data in a POST request and verify that your schema definitions work correctly
-
use a forward reference to another schema within a schema definitionuse 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 instanceuse the dump_schema function to convert a schema object to a Python dictionarydefine the settings for your app by loading a dictionary into the Molten SettingsComponentload the settings defined in a JSON file in your file system into a Molten SettingsComponent instancecreate a .TOML file that contains settings for a Molten app and read in that file using a TOMLSettingsComponent instancesummarize the key concepts covered in this course
IN THIS COURSE
-
1.Course Overview3m 7sUP NEXT
-
2.Installing Molten and Its Dependencies6m
-
3.Building Our First Molten App9m 52s
-
4.Exploring Routes in a Molten App9m 27s
-
5.Using Data Types in Processing Functions5m 46s
-
6.Integrating Molten Apps with Pytest11m 2s
-
7.Validating POST Requests with Schemas10m 26s
-
8.Testing Schema Definitions7m 44s
-
9.Defining Schemas with Nested Data6m 47s
-
10.Validating Python Dictionaries6m 10s
-
11.Transforming Schemas to Python Dictionaries7m 21s
-
12.Working with a Settings Component8m 43s
-
13.Working with Settings from a JSON File7m 16s
-
14.Loading Settings from a TOML File6m 24s
-
15.Course Summary2m 35s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform
Digital badges are yours to keep, forever.