click vs argparse


Both build CLI tools. click does it with less code:



# argparse — 12 lines for a simple command
import argparse
parser = argparse.ArgumentParser(description="Say hello")
parser.add_argument("name", help="Your name")
parser.add_argument("--count", type=int, default=1, help="Times to repeat")
args = parser.parse_args()
for _ in...