Python's argparse has improved the handling of command-line arguments like allowing options to take one or more arguments, the ability to specify expected data type of arguments (e.g. float, integer, etc.), easier handling of help messages, support for subcommands, and the possibility to group arguments. There are newer packages like Click1, Typer2, etc. which enhance the command-line interface with features like colors, progress bars, etc. However, mastering the command line is still difficult for a lot of new-comers. This talk explores how to develop commands in Python to make them accessible in multiple languages.

Note: The abstract of this article was first written as a proposition to an open-source conference in 2021.

References

  1. Click
  2. Typer