Other resources and tools
We will finish this chapter with some links to resources where you can learn more and some useful libraries for developing CLI applications:
- Although we have tried to make this chapter as comprehensive as we could, the
argparse
module has many more features than we could showcase here. The official documentation at https://docs.python.org/3/library/argparse.html is excellent, though. - If
argparse
is not to your liking, there are several third-party libraries available for command-line argument parsing. We suggest that you try them all:- Click is by far the most popular third-party CLI library for Python. Besides command-line parsing, it also provides features for creating interactive applications (such as input prompts) and for producing colorful output. You can learn about it at https://click.palletsprojects.com.
- Typer was created by the same developers as FastAPI. It aims to apply the same principles FastAPI applies to...