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

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

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

Download URL py_cmdoptions-0.0.3-py38-none-any.whl
Size 8.8 kB
Tags Python 3.8
SHA-256 checksum
How to use checksums
78ebd9e0a624b1be083f7a461b4822b2ae54f37911c20720e56b7258021b684b
BLAKE2b-256 checksum
How to use checksums
e2a19de658b3dd61d40e686debc0265eed0eb39be5a66424df137c5284e8a60c
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.3

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