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.4

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.4
File Interpreter ABI Platform
py_cmdoptions-0.0.4-py38-none-any.whl Python 3.8 none any Details

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

Download URL py_cmdoptions-0.0.4-py38-none-any.whl
Size 8.9 kB
Tags Python 3.8
SHA-256 checksum
How to use checksums
c10cc46f89b0af4461b7d0509cb1d10167ba42f67d9dbae36cffcf46d99c9763
BLAKE2b-256 checksum
How to use checksums
9e76f4cb8ff03fbf4e663094a20f518c15763122ebf79ac485627cc88e5108ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

Security for py-cmdoptions 0.0.4

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