The CLI
Explore how to update the CLI tool to implement filtering by various attributes in a clean architecture Python project. Learn to apply single and multiple filters on data requests, test the updated code, and understand input validation for better error management.
We'll cover the following...
We'll cover the following...
Updating the CLI file
At this point, fixing the CLI is extremely simple. We need to imitate what we did for the HTTP server, only without considering the filters because they weren’t part of the command-line tool.
In line 38, we get the inputs from the URL using the GET method. In line 39, we pass these inputs to build_room_list_request(url_request) to apply the filter on the inputs given in the URL. If we skip line 38, we’ll ...