parser = argparse.ArgumentParser()
parser.add_argument('-q', '--query', help='query', required=False)
parser.add_argument('-f', '--fields', help='field names', required=False)
Python argparse: Mutually exclusive group with some compatible arguments