Command line argument parsing alternatives, overview:
- getopt - the old, original command line argument parser.
- optparse - Complex Python 2.6 replacement for getopt, before being replaced by argparse.
- argparse - The current standard library command line argument parser.
- docopt - Write program docstring, parse docstring with
docopt
to produce CLI. - click - CLI arguments via function decorators. Aims at high composability and nesting complexity.
- clize -
clize.run(hello_world)
- defopt - Lightweight, no-effort argument parser.
defopt.run(main)
- fire - Generate command line interfaces (CLIs) from any Python object. For instance, use class to define CLI subcommands:
fire.Fire(Calculator)
- begins - Also based on function decorators, but uses function arguments. No updates since 2014 :(
- argh - Argh is a smart wrapper for argparse.
argh.dispatch_command(main)
- aaargh - "This project is no longer maintained! Use click."
- invoke - Designed for task execution, but can be fitted for use as CLI as well.
- plac, etc.
Refs: