Process arguments for the deep modeling project.
Project description
Argument checking for python programs
This is a minimum version for checking the input argument dict. It would examine argument's type, as well as keys and types of its sub-arguments.
A special case called variant is also handled,
where you can determine the items of a dict based the value of on one of its flag_name key.
There are three main methods of Argument class:
checkmethod that takes a dict and see if its type follows the definition in the classnormalizemethod that takes a dict and convert alias and add default value into itgendocmethod that outputs the defined argument structure and corresponding docs
There are also check_value and normalize_value that
ignore the leading key comparing to the base version.
When targeting to html rendering, additional anchor can be made for cross reference.
Set make_anchor=True when calling gendoc function and use standard ref syntax in rst.
The id is the same as the argument path. Variant types would be in square brackets.
Please refer to test files for detailed usage.
Additional features
- PEP 484 type annotations
- Native integration with Sphinx, DP-GUI, and Jupyter Notebook
- JSON encoder for
ArgumentandVariantclasses - Generate JSON schema from an
Argument, which can be further integrated with JSON editors such as Visual Studio Code
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dargs-0.4.10.tar.gz.
File metadata
- Download URL: dargs-0.4.10.tar.gz
- Upload date:
- Size: 44.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b39e0a93dcd323d0affb3f54ee2c11a439084d718934df08f38692dfbadddf8
|
|
| MD5 |
d41dab12ef182c1730877ba25994ad22
|
|
| BLAKE2b-256 |
ff070af423a22e9da22ce9107aa93e1b4b464c53526fd922dd0f1261e397b8f9
|
File details
Details for the file dargs-0.4.10-py3-none-any.whl.
File metadata
- Download URL: dargs-0.4.10-py3-none-any.whl
- Upload date:
- Size: 27.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f29eeb9db05fc6fb18a56a160fc57edea1912cec03d2bdaa920d19c3b152c3f1
|
|
| MD5 |
421426266577a179c7d6bebd546bab3b
|
|
| BLAKE2b-256 |
5901252ff0db66461f3251b024608a939942f3850014706461e462eb73c8a4a5
|