Skip to main content

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


Download files

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

Source Distribution

pycmdparse-1.0.0.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

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

pycmdparse-1.0.0-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file pycmdparse-1.0.0.tar.gz.

File metadata

  • Download URL: pycmdparse-1.0.0.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for pycmdparse-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a34ee473bdadfb7862a45f31a8ba6484f49e8e2f96f251504eb34522f30648c4
MD5 31bd1b11ee3673526c529e577587276d
BLAKE2b-256 6894b84caa825951078d6769b588f0a21120859f216d9e6c0f624cb84a5273b3

See more details on using hashes here.

File details

Details for the file pycmdparse-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pycmdparse-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for pycmdparse-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6a29c190206fd97ee76a6afef76308da81f0d2e7528e044f33b439bd2c03535
MD5 fb16bccee76db230cc87fe5a20f8521a
BLAKE2b-256 7b86d9667faf72fd0ec9b2401621298db88a7da0fdc3be34a4fb4994db500291

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