Command line interface#
dargs: Argument checking for Python programs
usage: dargs [-h] [--version] {check} ...
Named Arguments#
- --version
show program’s version number and exit
Sub-commands#
check#
Check a JSON file against an Argument
dargs check [-h] -f FUNC [--no-strict] [--trim-pattern TRIM_PATTERN]
[jdata ...]
Positional Arguments#
- jdata
Path to the JSON file. If not given, read from stdin.
Default: [<_io.TextIOWrapper name=’<stdin>’ mode=’r’ encoding=’utf-8’>]
Named Arguments#
- -f, --func
Function that returns an Argument object. E.g., dargs._test.test_arguments
- --no-strict
Do not raise an error if the key is not pre-defined
Default: True
- --trim-pattern
Pattern to trim the key
Default: “_*”
Example: dargs check -f dargs._test.test_arguments test_arguments.json