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.5.0.post0.tar.gz (52.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dargs-0.5.0.post0-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

Details for the file dargs-0.5.0.post0.tar.gz.

File metadata

  • Download URL: dargs-0.5.0.post0.tar.gz
  • Upload date:
  • Size: 52.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for dargs-0.5.0.post0.tar.gz
Algorithm Hash digest
SHA256 48ebff9f1f0ee7e4f246fdfde1ef8f3b8deda70b470e4793f60d376da4655322
MD5 04b445d1340e1ecee9e929238642a5f9
BLAKE2b-256 fb4455e8beb457c35a1d07de9d701f2f17e38baa4f0dade827299229df8cd3a1

See more details on using hashes here.

File details

Details for the file dargs-0.5.0.post0-py3-none-any.whl.

File metadata

  • Download URL: dargs-0.5.0.post0-py3-none-any.whl
  • Upload date:
  • Size: 30.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for dargs-0.5.0.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 18660530bbec7b7b56b780361bd97524510cc3f7384009e42fa62516da50e426
MD5 facc68d5625f0c242619e209cb00756a
BLAKE2b-256 19a2a296113a8fba89b7f696267ac3b7139935155c3f99c1d5d6784e28ee222e

See more details on using hashes here.

Supported by

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