A powerful Python 3 command-line parser
Yet Another Command-Line-Argument Parser
I needed a way to define sort-of-complex interdependencies between command-line options. None of the packages I found* were able to handle this out of the box to an acceptable degree, so I decided to try my own hand; I feel like the lib should be able to handle this stuff itself, without your needing to delegate roles like "check that these two flags aren't used at the same time as this arg" or "make sure all these things appear together, or alternatively that this second thing does" to external functions or post-parsing if-statements.
*Note: about a month after starting I discovered "RedCLAP", which did beat ergo to the idea of AND/OR/XOR clumps (by the names of "requires", "wants", and "conflicts"), albeit with a very different design philosophy overall; credit's due for (AFAIK) originating that concept, however! I also at about the same time found argh, which despite not solving the clumping issue appears to (by pure coincidence) share a number of features with ergo -- but it's currently looking for maintainers and does depend on argparse underneath (which I'm trying my best to get away from), so I'd say we're good.
Ergo, by the way, is still early in alpha. If it really doesn't solve the same problem for you that it does for me,
I think you'd be better off trying something else; docopt, for example, is superb, and Fire's no-assembly-required
philosophy is quite fun in its own right.
I also, in full disclosure, don't too much enjoy the design of a lot of current argparse-like solutions (really, most of them except docopt). As such, in addition to aiding in the creation of such interdependent systems as mentioned above, ergo's also my shot at making something that's just enjoyable to work with. Time will have to tell whether it succeeds!
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|ergo-0.5.1-py3-none-any.whl (21.7 kB) Copy SHA256 hash SHA256||Wheel||py3|
|ergo-0.5.1.tar.gz (25.2 kB) Copy SHA256 hash SHA256||Source||None|