optmatch - Library to allow an easy and effective parsing of command line options.
Full documentation: https://coderazzi.net/python/optmatch
optmatch is based on expressing the actions -with all options and related flags- that are supported, instead of just listing all possible argument flags.
For example:
class Example(OptionMatcher):
@optset
def handle_common_flag(self, mail_option):
…
@optmatcher
def handle_compression(self, filename, compress_flag =False):
…
@optmatcher(flags=’verbose’, options=’mode’)
def handle(self, filename, verbose=False, mode=’simple’, where=None):
…
In this example:
It is defined a common flag (–mail)
It is defined an action, supporting a –compress flag which is False by default, and requiring a filename parameter
It is defined a second action, supporting a –verbose flag and a –mode option, requiring one or two file locations.
Metadata
Release files for optmatch 1.0.0
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 |
|---|---|---|---|---|
| optmatch-1.0.0.tar.gz | 15.6 kB | Without provenance | Details for optmatch-1.0.0.tar.gz |
Release files / optmatch-1.0.0.tar.gz
| Download URL | optmatch-1.0.0.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4bb92c1cb121d9af00958f49da764befb86bf5ccec98aec6261e9a180f9d18a0
|
|
BLAKE2b-256 checksum How to use checksums |
9fdb536f0cd5bf9cc846a76a4741b2bd122179f7ac34b69ebd32759d66ececa4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
|
Security for optmatch 1.0.0
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.