I want to receive multi value option from click API, but the number of values is unknown. I went through the documentation for click API, but it directly supports only multi value when the number of values is know from before and can be mentioned in nargs parameter. In my case, the number of values can change and I want to receive all the values.
python demo.py shop --fruits apple --vegetable potato
python demo.py shop --fruits apple bananna --vegetable potato
For example if we consider shop to be the click command we are calling in the first case we should get
fruits: 'apple', vegetable: 'potato'
In second case
fruits: 'apple banana', vegetable: 'potato'
The format of output of course can be changed to an array or something else, but we don't have any freedom in the way we receive the input.