3 ms·
I've not personally stumbled on a UI where Click was used to make something nicer than argparse could. I'm not saying those don't exist, just that I haven't see
by kstrauser 2y ago
I've not personally stumbled on a UI where Click was used to make something nicer than argparse could. I'm not saying those don't exist, just that I haven't seen one.
Every time I've seen someone use Click at work, it was to implement some simple args that argparse could handle identically. "Why are we using Click here?" "Because it's nice!" "In what way?" "It's nice!" "But we're not actually using the nice parts." "Click is nice!"
Click is nice. IMO it's used way too often in cases where argparse would do just as well.
- noitpmeder 2y agoI've reached for click when I need to create a layered command scheme .. ex where `mytool command1 --help` and `mytool command2 --help` would provide two different sets of arguments. Similar to what the `git` suite provides.
- kstrauser 2y agoThe argparse version of that is `add_subparsers`: https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_subparsers https://docs.python.org/3/library/argparse.html#argparse.Arg...