4 ms·
For Python, I've standardize on click. It provides simple decorator to turn functions into commands, sub-commands, etc, with easy options and built-in help.
by pierrebai 6y ago
For Python, I've standardize on click.
It provides simple decorator to turn functions into commands, sub-commands, etc, with easy options and built-in help.
- disgrunt 6y agoClick is great and a feature-rich option. But recommend checking out Typer, which is even simpler if you're already using type annotations. [0] [0]: https://github.com/tiangolo/typer https://github.com/tiangolo/typer
- janto 6y ago"Typer stands on the shoulders of a giant. Its only internal dependency is Click."
- disgrunt 6y agoDidn't say it was a replacement for Click. I said it was simpler if you're already using type annotations.
- mayli 6y agoThat's why people use python, to avoid tons of .NET console boilerplate that does pretty much nothing.
- oblio 6y agoI was using click, but it requires too much boilerplate. Fire is much simpler to use, just as powerful (or maybe 95% as powerful) and it's developed by Google devs (it's not an official Google project as far as I remember), so it seems of reasonable quality. https://github.com/google/python-fire https://github.com/google/python-fire