commandpack


Namecommandpack JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/smartlegionlab/commandpack/
SummaryA cross-platform library for creation, storage, management of commands and command packages. Execution of commands, parsing of files with command packages.
upload_time2024-06-16 09:01:42
maintainerNone
docs_urlNone
authorA.A Suvorov
requires_python>=3.6
licenseBSD 3-Clause License
keywords commandpack smartlegionlab command executor
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # commandpack

***

I recommend using my new library [commandex](https://github.com/smartlegionlab/commandex). 

***

![GitHub top language](https://img.shields.io/github/languages/top/smartlegionlab/commandpack)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/commandpack?label=pypi%20downloads)](https://pypi.org/project/commandpack/)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/smartlegionlab/commandpack)](https://github.com/smartlegionlab/commandpack/)
[![GitHub](https://img.shields.io/github/license/smartlegionlab/commandpack)](https://github.com/smartlegionlab/commandpack/blob/master/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/commandpack)](https://pypi.org/project/commandpack)
[![PyPI - Format](https://img.shields.io/pypi/format/commandpack)](https://pypi.org/project/commandpack)
[![GitHub Repo stars](https://img.shields.io/github/stars/smartlegionlab/commandpack?style=social)](https://github.com/smartlegionlab/commandpack/)
[![GitHub watchers](https://img.shields.io/github/watchers/smartlegionlab/commandpack?style=social)](https://github.com/smartlegionlab/commandpack/)
[![GitHub forks](https://img.shields.io/github/forks/smartlegionlab/commandpack?style=social)](https://github.com/smartlegionlab/commandpack/)

***

## Short Description:

___commandpack___ -  A cross-platform library for creation, storage, management of commands and command packages. Execution of commands, parsing of files with command packages.

***

Author and developer: ___A.A Suvorov___

***

## Supported:

- Linux: All.
- Windows: 7/8/10.
- Termux (Android).

***

## Requirements:

- [Python](https://python.org) 3.6+
  - [Download](https://python.org)
  
***

## What's new?

___commandpack v0.3.1___

***

## Description:

A cross-platform library for creation, storage, management of commands and command packages. 
Execution of commands, parsing of files with command packages.
 
Used to create utilities for working with commands (execution, launch, autorun, storage).

You can keep your commands in simple and understandable files, collect them in one place,
split into named categories (packages) and execute at any time:

The files must have the extension *.cfg, or *.json and have the correct structure:


### commands.cfg:

```text
[package name 1]
command 1
command 2
command N

[package name 2]
command 1
command 2
command N
```

### commands.json:

```json5
{
  "name1":

  [
    "command1",
    "command2",
    "commandN"
  ],

  "name2":

  [
    "command1",
    "command2",
    "commandN"
  ]
}
```

***


## Help:

### Install and Use:

- `pip3 install commandpack`

Available tools:

- Command executors
- Pack makers
- Parsers
- Commands
- Packs
- Factories

```python
from commandpack.factories import Factory

os_executor = Factory.tools.get_os_executor()
sub_executor = Factory.tools.get_sub_executor()
executor = Factory.tools.get_executor()

command = Factory.tools.command_pack.create_command('pip list')
pack = Factory.tools.command_pack.create_pack('default')

cfg_parser = Factory.tools.parsers.get_cfg_parser()
json_parser = Factory.tools.parsers.get_json_parser()
parser = Factory.tools.parsers.get_parser()

pack_maker = Factory.tools.makers.get_pack_maker()

```

### Termux support:

Utilities created with use work "commandpack", without problems in Termux.

### Windows support:

- Install [python](https://python.org).
- `pip install commandpack`.

Utilities created with use work "commandpack", without problems in Windows:

### Test coverage:

#### Run tests:
- `pip install pytest`
- `pytest -v`
  

#### __Test coverage 100%__

- `pip install pytest-coverage`
- `pytest --cov`

![commandpack image](https://github.com/smartlegionlab/commandpack/raw/master/data/images/commandpack.png)


#### Report html:

- `pytest --cov --cov-report=html`

***

## Disclaimer of liability:

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

***

## Copyright:
    --------------------------------------------------------
    Licensed under the terms of the BSD 3-Clause License
    (see LICENSE for details).
    Copyright © 2018-2024, A.A Suvorov
    All rights reserved.
    --------------------------------------------------------

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/smartlegionlab/commandpack/",
    "name": "commandpack",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "commandpack, smartlegionlab, command executor",
    "author": "A.A Suvorov",
    "author_email": "smartlegiondev@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f2/da/db09865cb6e1f33d59ea257b49fa9ae11abe153cae27c63e7f7b6672707e/commandpack-0.3.1.tar.gz",
    "platform": null,
    "description": "# commandpack\n\n***\n\nI recommend using my new library [commandex](https://github.com/smartlegionlab/commandex). \n\n***\n\n![GitHub top language](https://img.shields.io/github/languages/top/smartlegionlab/commandpack)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/commandpack?label=pypi%20downloads)](https://pypi.org/project/commandpack/)\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/smartlegionlab/commandpack)](https://github.com/smartlegionlab/commandpack/)\n[![GitHub](https://img.shields.io/github/license/smartlegionlab/commandpack)](https://github.com/smartlegionlab/commandpack/blob/master/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/commandpack)](https://pypi.org/project/commandpack)\n[![PyPI - Format](https://img.shields.io/pypi/format/commandpack)](https://pypi.org/project/commandpack)\n[![GitHub Repo stars](https://img.shields.io/github/stars/smartlegionlab/commandpack?style=social)](https://github.com/smartlegionlab/commandpack/)\n[![GitHub watchers](https://img.shields.io/github/watchers/smartlegionlab/commandpack?style=social)](https://github.com/smartlegionlab/commandpack/)\n[![GitHub forks](https://img.shields.io/github/forks/smartlegionlab/commandpack?style=social)](https://github.com/smartlegionlab/commandpack/)\n\n***\n\n## Short Description:\n\n___commandpack___ -  A cross-platform library for creation, storage, management of commands and command packages. Execution of commands, parsing of files with command packages.\n\n***\n\nAuthor and developer: ___A.A Suvorov___\n\n***\n\n## Supported:\n\n- Linux: All.\n- Windows: 7/8/10.\n- Termux (Android).\n\n***\n\n## Requirements:\n\n- [Python](https://python.org) 3.6+\n  - [Download](https://python.org)\n  \n***\n\n## What's new?\n\n___commandpack v0.3.1___\n\n***\n\n## Description:\n\nA cross-platform library for creation, storage, management of commands and command packages. \nExecution of commands, parsing of files with command packages.\n \nUsed to create utilities for working with commands (execution, launch, autorun, storage).\n\nYou can keep your commands in simple and understandable files, collect them in one place,\nsplit into named categories (packages) and execute at any time:\n\nThe files must have the extension *.cfg, or *.json and have the correct structure:\n\n\n### commands.cfg:\n\n```text\n[package name 1]\ncommand 1\ncommand 2\ncommand N\n\n[package name 2]\ncommand 1\ncommand 2\ncommand N\n```\n\n### commands.json:\n\n```json5\n{\n  \"name1\":\n\n  [\n    \"command1\",\n    \"command2\",\n    \"commandN\"\n  ],\n\n  \"name2\":\n\n  [\n    \"command1\",\n    \"command2\",\n    \"commandN\"\n  ]\n}\n```\n\n***\n\n\n## Help:\n\n### Install and Use:\n\n- `pip3 install commandpack`\n\nAvailable tools:\n\n- Command executors\n- Pack makers\n- Parsers\n- Commands\n- Packs\n- Factories\n\n```python\nfrom commandpack.factories import Factory\n\nos_executor = Factory.tools.get_os_executor()\nsub_executor = Factory.tools.get_sub_executor()\nexecutor = Factory.tools.get_executor()\n\ncommand = Factory.tools.command_pack.create_command('pip list')\npack = Factory.tools.command_pack.create_pack('default')\n\ncfg_parser = Factory.tools.parsers.get_cfg_parser()\njson_parser = Factory.tools.parsers.get_json_parser()\nparser = Factory.tools.parsers.get_parser()\n\npack_maker = Factory.tools.makers.get_pack_maker()\n\n```\n\n### Termux support:\n\nUtilities created with use work \"commandpack\", without problems in Termux.\n\n### Windows support:\n\n- Install [python](https://python.org).\n- `pip install commandpack`.\n\nUtilities created with use work \"commandpack\", without problems in Windows:\n\n### Test coverage:\n\n#### Run tests:\n- `pip install pytest`\n- `pytest -v`\n  \n\n#### __Test coverage 100%__\n\n- `pip install pytest-coverage`\n- `pytest --cov`\n\n![commandpack image](https://github.com/smartlegionlab/commandpack/raw/master/data/images/commandpack.png)\n\n\n#### Report html:\n\n- `pytest --cov --cov-report=html`\n\n***\n\n## Disclaimer of liability:\n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n***\n\n## Copyright:\n    --------------------------------------------------------\n    Licensed under the terms of the BSD 3-Clause License\n    (see LICENSE for details).\n    Copyright \u00a9 2018-2024, A.A Suvorov\n    All rights reserved.\n    --------------------------------------------------------\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License",
    "summary": "A cross-platform library for creation, storage, management of commands and command packages. Execution of commands, parsing of files with command packages.",
    "version": "0.3.1",
    "project_urls": {
        "Documentation": "https://github.com/smartlegionlab/commandpack/blob/master/README.md",
        "Homepage": "https://github.com/smartlegionlab/commandpack/",
        "Release notes": "https://github.com/smartlegionlab/commandpack/releases"
    },
    "split_keywords": [
        "commandpack",
        " smartlegionlab",
        " command executor"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0a0fe56d675cfbb9a31dc22196eba42a33fea60e2fca79fc18a0159438ef1c6a",
                "md5": "f69af5d99a88ebb60228c1bf9ee798c8",
                "sha256": "ef81d0f8db69f55560d88d028c63a6ab39ca0f7e4dde157c127b0d8c9716f888"
            },
            "downloads": -1,
            "filename": "commandpack-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f69af5d99a88ebb60228c1bf9ee798c8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 7547,
            "upload_time": "2024-06-16T09:01:40",
            "upload_time_iso_8601": "2024-06-16T09:01:40.515470Z",
            "url": "https://files.pythonhosted.org/packages/0a/0f/e56d675cfbb9a31dc22196eba42a33fea60e2fca79fc18a0159438ef1c6a/commandpack-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f2dadb09865cb6e1f33d59ea257b49fa9ae11abe153cae27c63e7f7b6672707e",
                "md5": "93fb9244bb289823423aa02c2a17a7e5",
                "sha256": "cd4e736625ccea67a79df205e0a699931de280d5b7019e5d82be49df230cc32e"
            },
            "downloads": -1,
            "filename": "commandpack-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "93fb9244bb289823423aa02c2a17a7e5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 6497,
            "upload_time": "2024-06-16T09:01:42",
            "upload_time_iso_8601": "2024-06-16T09:01:42.451382Z",
            "url": "https://files.pythonhosted.org/packages/f2/da/db09865cb6e1f33d59ea257b49fa9ae11abe153cae27c63e7f7b6672707e/commandpack-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-16 09:01:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "smartlegionlab",
    "github_project": "commandpack",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "tox": true,
    "lcname": "commandpack"
}
        
Elapsed time: 0.26958s