commandparse
Module to parse command based CLI application.
Usage:
- Subclass the Command class
- Add a method with a name such as
prefix_commandnamewith kwargs as required argument - Create an ArgumentParser instance
- Call the
Subclass.add_suparserswith the ArgumentParser instance and other settings - Use the
dispatch_commandfunction with the args returned byparser.parse_args()
parser = ArgumentParser(...)
[...]
Subclass.add_subparsers(parser, prefixes=["get_", "do_", ...], title="commands", description="available commands")
cmd = Subclass(...)
cmd.dispatch_command(commands, args)
See example.py for a more complete example. For a real world application using this lib, see: https://github.com/franc-pentest/ldeep
Metadata
Release files for commandparse 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| commandparse-1.1.2.tar.gz | 5.4 kB | Without provenance | Details for commandparse-1.1.2.tar.gz |
Release files / commandparse-1.1.2.tar.gz
| Download URL | commandparse-1.1.2.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4bd7bdd01b52eaa32316d6149a00b4c3820a40ff2ad62476b46aaae65dbe9faa
|
|
BLAKE2b-256 checksum How to use checksums |
796b6f1879101e405e2a5c7d352b340bc97d1936f8d54a8934ae32aac1828e50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for commandparse 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.