Follow

@schlink If you are sticking to the standard library, argparse.

If you are willing to take a dependency, I like click: click.palletsprojects.com/en/7

I have never used it, but I've also heard good things about typer, which is basically "click, but based on the type hints for your functions": github.com/tiangolo/typer

Click is particularly helpful if you want to have subcommands, e.g. "myprogram add" and "myprogram remove".

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.