I want to make the --new-entry
paramettre be able to process a key-value sequence with space as statement separator.
As example:
script.py --new-entry name="The Republic" author="Plato" year="-400"
In this example, name="The Republic" author="Plato" year="-400"
is the whole value of the parameter --new-entry
. Ideally, I want to get it inside a dictionnary, like:
{
"name": "The Republic",
"author": "Plato",
…
}
So, is their a feature like this inside argparse, or with any other library?