Hacker News new | ask | show | jobs
by jblarneyforward 2499 days ago
Click and argparse end up with a lot of boilerplate. `defopt` (https://defopt.readthedocs.io/en/stable/) reduces it to almost nothing (granted only in Python 3), is only a single file and even turns your function docstring into command help text.

With every other tool I’ve tried, I end up writing a python API and a CLI and documenting it twice.

Defopt eliminates that almost completely (but with *args still allows for elegant interfaces)