Adding upstream version 0.6.2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e5d20de2e1
commit
271f3e2863
20 changed files with 2544 additions and 0 deletions
29
examples/demo.py
Normal file
29
examples/demo.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
"""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)
|
Loading…
Add table
Add a link
Reference in a new issue