3 ms·
> Most people first decide whether or not they want to use pypi packages, and then start evaluating which ones are appropriate. I don't think it's as binary a
by wutbrodo 7y ago
> Most people first decide whether or not they want to use pypi packages, and then start evaluating which ones are appropriate.
I don't think it's as binary as this. There should be, at least intuitively, a mild negative bias to adding a marginal dependency, even once you're dependent on pypi. We're lucky enough to not be dealing with a dumpster fire ecosystem like nodejs, but it's still a good habit.
For me, writing your interface with click doesn't seem too much better than writing it with argparse, certainly not enough to get over the (small) activation energy of a non-stdlib dependency
- kissgyorgy 7y agoClick is multiple order of magnitude better than argparse. I don't even start a CLI app with argparse anymore, because even with very simple interfaces you will hit it's limitations. You should try click.
- mixmastamyk 7y agoIt is a bit clunky but haven’t hit a limit since Py 3.4 or so.
- wutbrodo 7y agoInteresting, thanks, I had just skimmed the posted article and it looked substantially similar to argparse, but I guess I'll take a closer look.