Python argparse required?

So, two things:

  1. In the general case, this is done with add_mutually_exclusive_group(required=True) and adding the mutually exclusive arguments to that group (this isn't exactly what you want, since it won't allow you to pass both, but it's close enough).
  2. In this specific case, you should be using the action='version' action for displaying the version, which exists specifically for this purpose, and leave -f plain required=True as you've already written it.