Building a CLI with argparse
CLI
| Beginner
- 9 videos | 39m 8s
- Includes Assessment
- Earns a Badge
It's common to need to deliver software that runs with a variety of options and a command line interface is a great way to let users invoke these various options. CLIs have been used to run programs since the early 1960s and are still relevant today. Their simplistic design, small footprint, and self-documentation make them ideal for automated or scheduled tasks. In this course, you'll review the history of CLIs and learn how to build a CLI using argparse, a module in the Python Standard Library. You'll examine positional and optional arguments, as well as how to use custom actions. Finally, you'll learn how to install a Python module as an editable package and explore the alternative, third-party packages for building a CLI - docopt and click. This course was originally created by Global Knowledge (GK).
WHAT YOU WILL LEARN
-
Recognize command line interface (cli) concepts that will be covered in the courseRecognize the history and uses of a command line interfaceRecognize the argumentparser class and its add_argument() method, as well as how to add positional arguments, set help text, and designate a type for each argumentRecognize how to add optional arguments, set the dest (destination), designate metavar to change help text that's generated, and assign long and abbreviated argument namesRecognize why you would use a custom action and how to construct one
-
Recognize tools that are alternatives to argparse for building a cliRecognize how to use pip to install your python module as an editable packageRecognize how to write a cli using the open-source tool docoptRecognize how to write a cli by using the open-source tool click
IN THIS COURSE
-
1m
-
1m 20s
-
5m 18s
-
7m 34s
-
7m 39s
-
1m 9s
-
4m 16s
-
6m 12s
-
4m 42s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
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.