Putting Everything Together
Putting Everything Together. So far, your site connectivity checker project has a function that checks if a website is online, and it also has a CLI that you quickly built using the
00:14 In this step, you’ll write the glue code—the code that will bring all of these components together and make your application work as a full-fledged command-line application. First, you’ll start by setting up the application’s main script or entry-point script.
Namespace object is then stored in the
user_args local variable. This puts together a list of target URLs by calling a helper function that you’ll be coding in a moment. Here, you define an
if statement to check if the list of URLs is empty.
02:00 This line invokes a function, which takes a list of target URLs as an argument and runs the connectivity check over each URL. As the name points out, this function will run the connectivity check synchronously, or one after another. Again, you’ll be coding this function in a moment.
Become a Member to join the conversation.