cmd-parser


Namecmd-parser JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryNone
upload_time2024-07-05 23:52:39
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cmd-parser

[![PyPI - Version](https://img.shields.io/pypi/v/cmd-parser.svg)](https://pypi.org/project/cmd-parser)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cmd-parser.svg)](https://pypi.org/project/cmd-parser)

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](#installation)
- [Usage](#usage)
- [License](#license)

## Installation

You can install the Command Parser Library using pip:

```console
pip install cmd-parser
```

## Usage

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

```python
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:

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

## License

`cmd-parser` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cmd-parser",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "\"Andr\u00e9 P. Santos\" <andreztz@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e2/39/faf3e528309c3298ff2420adc3de36bc2ddecd98136955a67dc5913143dc/cmd_parser-0.0.1.tar.gz",
    "platform": null,
    "description": "# cmd-parser\n\n[![PyPI - Version](https://img.shields.io/pypi/v/cmd-parser.svg)](https://pypi.org/project/cmd-parser)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cmd-parser.svg)](https://pypi.org/project/cmd-parser)\n\nThe `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.\n\n---\n\n**Table of Contents**\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [License](#license)\n\n## Installation\n\nYou can install the Command Parser Library using pip:\n\n```console\npip install cmd-parser\n```\n\n## Usage\n\nHere's a quick example of how to use the library:\n\n```python\nfrom cmd_parser.core import asdict, parse\n\ncommand_string = '!command arg1 arg2 param1=\"value1 test\" param2=value2'\nparsed_command = parse(command_string)\nprint(asdict(parsed_command))\n```\n\nThis will output:\n\n```python\n{\n    'command': 'command',\n    'args': ['arg1', 'arg2'],\n    'kwargs': {\n        'param1': 'value1 test',\n        'param2': 'value2'\n    }\n}\n```\n\n## License\n\n`cmd-parser` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": null,
    "version": "0.0.1",
    "project_urls": {
        "Documentation": "https://github.com/unknown/cmd-parser#readme",
        "Issues": "https://github.com/unknown/cmd-parser/issues",
        "Source": "https://github.com/unknown/cmd-parser"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8e51ba485b31bd1ce18dd36e24782718e49ced2d77ee00f9cc7ae9a7e462e4fd",
                "md5": "e1c768b546ebe192062e1e51dd23a5de",
                "sha256": "b856189d552abab94c75ea3c79c617b4b55942bff40a1d29945d65de5bfd7fd3"
            },
            "downloads": -1,
            "filename": "cmd_parser-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e1c768b546ebe192062e1e51dd23a5de",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 4213,
            "upload_time": "2024-07-05T23:52:38",
            "upload_time_iso_8601": "2024-07-05T23:52:38.379881Z",
            "url": "https://files.pythonhosted.org/packages/8e/51/ba485b31bd1ce18dd36e24782718e49ced2d77ee00f9cc7ae9a7e462e4fd/cmd_parser-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e239faf3e528309c3298ff2420adc3de36bc2ddecd98136955a67dc5913143dc",
                "md5": "a97112286777937c025d2703cb94ceb6",
                "sha256": "e7e830e0a5682a738590375aec201251f92cf51b5ca921f1f532e16ca35a7140"
            },
            "downloads": -1,
            "filename": "cmd_parser-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a97112286777937c025d2703cb94ceb6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6910,
            "upload_time": "2024-07-05T23:52:39",
            "upload_time_iso_8601": "2024-07-05T23:52:39.639847Z",
            "url": "https://files.pythonhosted.org/packages/e2/39/faf3e528309c3298ff2420adc3de36bc2ddecd98136955a67dc5913143dc/cmd_parser-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-05 23:52:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "unknown",
    "github_project": "cmd-parser#readme",
    "github_not_found": true,
    "lcname": "cmd-parser"
}
        
Elapsed time: 0.29646s