1
0
Fork 0
decli/examples/demo.py
Daniel Baumann 271f3e2863
Adding upstream version 0.6.2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-04-21 10:59:46 +02:00

29 lines
680 B
Python

"""Simple app example"""
from decli import cli
data = {
"prog": "app",
"arguments": [
{"name": "--install", "action": "store_true", "group": "opas"},
{"name": "--purge", "action": "store_false", "group": "opas"},
],
"subcommands": {
"title": "main",
"commands": [
{
"name": "commit",
"arguments": [
{
"name": "--bocha",
"action": "store_true",
"group": "opas",
}
],
}
],
},
}
parser = cli(data)
args = parser.parse_args()
print(args)