Similar projectsΒΆ

Obviously, Argh is not the only CLI helper library in the Python world. It was created when some similar solutions already existed; more appeared later on. There are valid reasons behind maintaining most projects.

The list below is nowhere near exhausting; certain items are yet to be reviewed; the comments should have been more structured. However, it gives a picture of the alternatives.

Ideally, we’d need a table with the following columns: supports argparse; has integrated parser; requires subclassing; supports nested commands; is bound to an unrelated piece of software; involves “magic” (i.e. undermines clarity); depends on outdated libraries; has simple API; has unobtrusive API; supports Python3. Not every “yes” in this table would count as pro.

  • argdeclare requires additional classes and lacks support for nested commands.
  • argparse-cli requires additional classes.
  • django-boss seems to lack support for nested commands and is strictly Django-specific.
  • entrypoint is lightweight but involves a lot of magic and seems to lack support for nested commands.
  • opster and finaloption support nested commands but are based on the outdated optparse library and therefore reimplement some features available in argparse. They also introduce decorators that don’t just decorate functions but change their behaviour, which is bad practice.
  • simpleopt has an odd API and is rather a simple replacement for standard libraries than an extension.
  • opterator is based on the outdated optparse and does not support nested commands.
  • clap ships with its own parser and therefore is incompatible with clap-agnostic code.
  • plac is a very powerful alternative to argparse. I’m not sure if it’s worth migrating but it is surely very flexible and easy to use.
  • baker
  • plumbum
  • docopt
  • aaargh
  • cliff
  • cement

Previous topic

API Reference

Next topic

Real-life usage

This Page