nevargs¶
Nevargs is a simple package that formats cli-like argument string into a dictionary.
Nevargs package is available at https://pypi.org/project/nevargs
Arguments with no value are returned under args
and for each flag found, it's arguments are returned under {flag}
Installation¶
python3 -m pip install nevargs
Example¶
>>> import nevargs
>>> s = "this is -f True fun -c command"
>>> nevargs.dictify(s)
{'args': ['this', 'is', 'fun'], '-f': ['True'], '-c': ['command']}