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.9.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

dargs-0.4.9-py3-none-any.whl (26.9 kB view details)

Uploaded Python 3

File details

Details for the file dargs-0.4.9.tar.gz.

File metadata

  • Download URL: dargs-0.4.9.tar.gz
  • Upload date:
  • Size: 44.8 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.9.tar.gz
Algorithm Hash digest
SHA256 8bbebcdff6cca29a57931221a64be86d8ada87682e019b28be4704d283cdea25
MD5 f6a8e8acba7c50151f46f54365474639
BLAKE2b-256 987b17f24e2e7839ea6aebbedf8daad975eaf557a4dd0e6f015a616adbba641c

See more details on using hashes here.

File details

Details for the file dargs-0.4.9-py3-none-any.whl.

File metadata

  • Download URL: dargs-0.4.9-py3-none-any.whl
  • Upload date:
  • Size: 26.9 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 f952ff5fc55a99e63c17b6d4d1c11c0f929a2810d9ca212c85c85cf2df45c152
MD5 0187479aab300d33fc9bbe42bc277703
BLAKE2b-256 bad0fac4b412c2975bc0bc47b92d1e9ffde1e68a0ff59e0a72ff6454b8866266

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