Skip to main content

Process arguments for the deep modeling project.

Project description

Argument checking for python programs

conda-forge pip install Documentation Status

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:

  • check method that takes a dict and see if its type follows the definition in the class
  • normalize method that takes a dict and convert alias and add default value into it
  • gendoc method 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dargs-0.4.10.tar.gz (44.9 kB view details)

Uploaded Source

Built Distribution

dargs-0.4.10-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

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

Hashes for dargs-0.4.10.tar.gz
Algorithm Hash digest
SHA256 2b39e0a93dcd323d0affb3f54ee2c11a439084d718934df08f38692dfbadddf8
MD5 d41dab12ef182c1730877ba25994ad22
BLAKE2b-256 ff070af423a22e9da22ce9107aa93e1b4b464c53526fd922dd0f1261e397b8f9

See more details on using hashes here.

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

Hashes for dargs-0.4.10-py3-none-any.whl
Algorithm Hash digest
SHA256 f29eeb9db05fc6fb18a56a160fc57edea1912cec03d2bdaa920d19c3b152c3f1
MD5 421426266577a179c7d6bebd546bab3b
BLAKE2b-256 5901252ff0db66461f3251b024608a939942f3850014706461e462eb73c8a4a5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page