`argparse` is probably my favorite part of the entire #python standard library. Its interface is quite simple, but it's still able to model all kinds of CLI paradigms.
Even though there are "easier" libraries that use decorators or comments to generate CLI code, I find that argparse requires just the right level of verbosity. It's also very flexible while still remaining simple.
@tamas Agree. It’s very capable and I’m always a bit sad that many people default to click from the get-go, tbh. Click is fine, but I bet most projects could/should stick to argparse.
@fabian 💯 Click is great and impressive how much it can achieve with decorators, but I find that all but the simplest cases require roughly the same amount of code as argparse, but it's "weird code" in decorators, instead of plain function calls. Plus click is a lot slower if there is enough complexity (unless they improved that since the last time I tried it).
@tamas @fabian what's your opinion about docopt?
@CragHack @fabian I like the idea of it, but again, I feel it's too much magic for not that much gain. It's awesome that it's possible to implement a CLI this way, but I'm not sure it's worth the complexity. Also, the delay these magic solutions add in the CLI is off-putting for me.