Skip to main content

py_cmdoptions

py_cmdoptions is a tool that makes it easy to create a command with options.

you can extend Executor to create a new cmd types.

you can also extend Option to create a new option types.

example1

from py_cmdoptions.executor import Executor
from py_cmdoptions.option import Option

class Python(Executor):
    cmd:str = 'python'

class Version(Option):
    opt:str = '--version'

py = Python()
py.addOption(Version())
print(py)

some command options have a specific order, such as ffmpeg:

usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

example2

from py_cmdoptions.executor import Executor
from py_cmdoptions.option import Option

class FFmpeg(Executor):
    cmd:str = 'ffmpeg'

class InFile(Option):
    opt:str = '-i'
    prio:int = 1

class OutFile(Option):
    opt:str = ''
    prio:int = 2

ff = FFmpeg()
ff.addOption(OutFile('output.mp4'))
ff.addOption(InFile('input.mp4'))
print(ff)

Metadata

Release files for py-cmdoptions 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for py-cmdoptions 0.0.6
File Interpreter ABI Platform
py_cmdoptions-0.0.6-py38-none-any.whl Python 3.8 none any Details

Release files / py_cmdoptions-0.0.6-py38-none-any.whl

Download URL py_cmdoptions-0.0.6-py38-none-any.whl
Size 9.0 kB
Tags Python 3.8
SHA-256 checksum
How to use checksums
3d140c5c0ac5318e6e5b7ab35fe7c370730e5088e94dade1487cb3eff6d9d314
BLAKE2b-256 checksum
How to use checksums
aec9842ae3a36952241c4113b5e7a91259d49d75002e94d6d30031c607ea62dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for py-cmdoptions 0.0.6

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page