Is there a way to require a mutually exclusive group, where one of the groups has multiple options?

I would like a behavior where exactly one of

  • --a
  • --b AND --c

are required. I know how to do it if the second requirement were just --b:

group = parser.add_mutually_exclusive_group(required=True)
group.add_argument('--a', type=str)
group.add_argument('--b', type=str)


Comments

Popular posts from this blog

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations