4 ms·
It really comes handy IMHO when you have a lot of commands with nesting and context to share. I've used it on a CLI tool with many sub-commands implemented in i
by jle17 7y ago
It really comes handy IMHO when you have a lot of commands with nesting and context to share. I've used it on a CLI tool with many sub-commands implemented in imported modules and it made things really easy while I don't think argpase would have "scaled" without becoming a mess.
Plus it comes with some useful utilities you might need in a cli to show a progressbar, display color, open test in a pager/an editor etc.
The official doc is really nice and gives it more justice than this blog post: https://click.palletsprojects.com/en/7.x https://click.palletsprojects.com/en/7.x.
- btown 7y agoAh - makes a lot more sense when they describe Git, with its nested interfaces and argument parsers (and reused logic therein) as a motivating example!