Skip to main content

cmd-parser

PyPI - Version PyPI - Python Version

The cmd-parser library provides a simple way to parse command-line style input strings into a structured dictionary format. This is useful for applications that need to interpret commands with arguments and parameters.


Table of Contents

Installation

You can install the Command Parser Library using pip:

pip install cmd-parser

Usage

Here's a quick example of how to use the library:

from cmd_parser.core import asdict, parse

command_string = '!command arg1 arg2 param1="value1 test" param2=value2'
parsed_command = parse(command_string)
print(asdict(parsed_command))

This will output:

{
    'command': 'command',
    'args': ['arg1', 'arg2'],
    'kwargs': {
        'param1': 'value1 test',
        'param2': 'value2'
    }
}

License

cmd-parser is distributed under the terms of the MIT license.

Metadata

Release files for cmd-parser 0.0.1

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

Source distribution (sdist)

Source distribution for cmd-parser 0.0.1
File Size Uploaded
cmd_parser-0.0.1.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cmd-parser 0.0.1
File Interpreter ABI Platform
cmd_parser-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / cmd_parser-0.0.1.tar.gz

Download URL cmd_parser-0.0.1.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e7e830e0a5682a738590375aec201251f92cf51b5ca921f1f532e16ca35a7140
BLAKE2b-256 checksum
How to use checksums
e239faf3e528309c3298ff2420adc3de36bc2ddecd98136955a67dc5913143dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / cmd_parser-0.0.1-py3-none-any.whl

Download URL cmd_parser-0.0.1-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b856189d552abab94c75ea3c79c617b4b55942bff40a1d29945d65de5bfd7fd3
BLAKE2b-256 checksum
How to use checksums
8e51ba485b31bd1ce18dd36e24782718e49ced2d77ee00f9cc7ae9a7e462e4fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4
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