One nuisance with building command line options in argparse, click, or any other system is duplicates in the parameter list. When using argparse, I would call various functions to add a set of arguments to my ArgumentParser (e.g., for shared output parameters/configuration): Treat the above (and below) as pseudocode, but hopefully they gets the idea…
Category: cli
A Quickety `click` Tutorial
I’ve always used argparse. I’ve tried a few others, but it’s hard to be beat a built-in argument parser with power and flexibility of argparse. Recently, however, I’ve found click appearing increasingly in my requirements.txt and pyproject.toml. While I have not explored the depths of click (most of my use cases don’t involve a high…