A Python command line arg parser, and usage instructions generator
Project description
For authors of command-line utilities. Simplifies: 1) Defining command-line options and parameters, 2) Parsing the command line, and 3) Displaying usage instructions to the console.
Utility developers will 1) Subclass a module-defined class, 2) Include a YAML spec in the subclass to define the utility’s options and usage, and 3) Invoke the module arg parser. When the utility is run, if the command line is valid according to the YAML schema, then the supplied args are injected into the subclass by the parser. Otherwise errors are automatically displayed to the console.
If the user specifies ‘-h’ or ‘–help’ on the command line, then usage instructions are displayed as defined in the YAML, in a form generally recognizable to users of console utilities. Specifically, displays summary usage, detailed options and params (including categorized options), positional params, and examples.
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
Hashes for pycmdparse-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6a29c190206fd97ee76a6afef76308da81f0d2e7528e044f33b439bd2c03535 |
|
MD5 | fb16bccee76db230cc87fe5a20f8521a |
|
BLAKE2b-256 | 7b86d9667faf72fd0ec9b2401621298db88a7da0fdc3be34a4fb4994db500291 |