wrapper-bar


Namewrapper-bar JSON
Version 0.1.3 PyPI version JSON
download
home_pageNone
SummaryProgress Bar with command wrapping
upload_time2024-04-23 07:02:23
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) 2024 Soumyo Deep Gupta Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords d33pster progress-bar wrapper-bar wrap commands
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Overview

`Wrapper-Bar` is a python module to help wrap commands with the progress bar. `Wrapper-Bar` helps in wrapping shell commands, or even python scripts with a progress bar and ETA.

## Badges

![PyPI - Version](https://img.shields.io/pypi/v/wrapper-bar)
![PyPI - Status](https://img.shields.io/pypi/status/wrapper-bar)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/wrapper-bar)
![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/pypi/wrapper-bar)
![PyPI - License](https://img.shields.io/pypi/l/wrapper-bar)

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Uninstall](#uninstall)

## Installation

To install `wrapper-bar`, use pip.

```bash
pip install wrapper-bar==0.1.3
```

## Usage

- Import the Wrapper class.

  ```python
  >>> from wrapper_bar.wrapper import Wrapper
  ```

- Initialize the Wrapper Class.

  ```python
  >>> wrapControl = Wrapper(*params) # for parameters, check docstring.
  ```

- Docstring

  ```bash
  # to check docstring, in terminal/CMD, run:
  $ pydoc wrapper_bar.wrapper.Wrapper
  ```

- Methods

  - `decoy`

    ```python
    >>> wrapControl.decoy(*params) # parameters are in the docstring.
    # decoy is for creating empty progressbar.
    ```
  
  - `shellWrapper`

    ```python
    >>> wrapControl.shellWrapper(*params) # parameters are in the docstring.
    # shellWrapper can wrap list of shell commands across the progressbar.
    ```

  - `pyWrapper`

    ```python
    >>> wrapControl.pyWrapper(*params) # parameters are in the docstring.
    # pyWrapper can wrap list of python scripts across the progressbar.
    ```
  
  - `pyShellWrapper`
  
    ```python
    >>> wrapControl.pyShellWrapper(*params) # parametes are in the docstring.
    # pyShellWrapper can wrap inline python code across a progressbar.
    ```

    Working of `pyShellWrapper`:

    - `pyShellWrapper` takes two compulsory parameters => `pythoncodes` and `dependencies`. To explain them, let us see below

      ```python
      # pythoncodes and dependencies can have any python code except 
      # return, print or yield statements.

      # let us take this as an example:
      >>> pythoncodes = ["""a = b+c""", """b=c+d"""]

      # Now for the above python codes, values of 'b', 'c' and 'd' 
      # are a dependency. Therefore
      
      >>> dependencies = ["""b=10""", """c=10\nd=20\n"""] 
      
      # try to keep one statement only inside """...""", 
      # but if need be, then you can also put multiple 
      # statements followed by '\n'. Like """c=10\nd=20\n"""

      # and now we will execute them with the loading bar as the 
      # front.
      
      >>> from wrapper_bar.wrapper import Wrapper
      >>> w = Wrapper("Loading:")
      >>> w.pyShellWrapper(pythoncodes, dependencies) # this will output the following:
      Loading: |▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓|Time: 0:00:10
      
      # To fetch the outputs, we will use a property 'pyShellWrapperResults' 
      # defined under the `Wrapper Class`

      >>> a = w.pyShellWrapperResults['a'] # this will be 20
      >>> b = w.pyShellWrapperResults['b'] # this will be 30
      ```

## Uninstall

To uninstall `wrapper-bar`, use pip.

```bash
pip uninstall wrapper-bar
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "wrapper-bar",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "Soumyo Deep Gupta <deep.main.ac@gmail.com>",
    "keywords": "d33pster, progress-bar, wrapper-bar, wrap commands",
    "author": null,
    "author_email": "Soumyo Deep Gupta <deep.main.ac@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/aa/95/6c9ee284a25d752b268b79876b30bf2faaf07b510863f8e32852ebbf0e39/wrapper_bar-0.1.3.tar.gz",
    "platform": null,
    "description": "# Overview\n\n`Wrapper-Bar` is a python module to help wrap commands with the progress bar. `Wrapper-Bar` helps in wrapping shell commands, or even python scripts with a progress bar and ETA.\n\n## Badges\n\n![PyPI - Version](https://img.shields.io/pypi/v/wrapper-bar)\n![PyPI - Status](https://img.shields.io/pypi/status/wrapper-bar)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/wrapper-bar)\n![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/pypi/wrapper-bar)\n![PyPI - License](https://img.shields.io/pypi/l/wrapper-bar)\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Uninstall](#uninstall)\n\n## Installation\n\nTo install `wrapper-bar`, use pip.\n\n```bash\npip install wrapper-bar==0.1.3\n```\n\n## Usage\n\n- Import the Wrapper class.\n\n  ```python\n  >>> from wrapper_bar.wrapper import Wrapper\n  ```\n\n- Initialize the Wrapper Class.\n\n  ```python\n  >>> wrapControl = Wrapper(*params) # for parameters, check docstring.\n  ```\n\n- Docstring\n\n  ```bash\n  # to check docstring, in terminal/CMD, run:\n  $ pydoc wrapper_bar.wrapper.Wrapper\n  ```\n\n- Methods\n\n  - `decoy`\n\n    ```python\n    >>> wrapControl.decoy(*params) # parameters are in the docstring.\n    # decoy is for creating empty progressbar.\n    ```\n  \n  - `shellWrapper`\n\n    ```python\n    >>> wrapControl.shellWrapper(*params) # parameters are in the docstring.\n    # shellWrapper can wrap list of shell commands across the progressbar.\n    ```\n\n  - `pyWrapper`\n\n    ```python\n    >>> wrapControl.pyWrapper(*params) # parameters are in the docstring.\n    # pyWrapper can wrap list of python scripts across the progressbar.\n    ```\n  \n  - `pyShellWrapper`\n  \n    ```python\n    >>> wrapControl.pyShellWrapper(*params) # parametes are in the docstring.\n    # pyShellWrapper can wrap inline python code across a progressbar.\n    ```\n\n    Working of `pyShellWrapper`:\n\n    - `pyShellWrapper` takes two compulsory parameters => `pythoncodes` and `dependencies`. To explain them, let us see below\n\n      ```python\n      # pythoncodes and dependencies can have any python code except \n      # return, print or yield statements.\n\n      # let us take this as an example:\n      >>> pythoncodes = [\"\"\"a = b+c\"\"\", \"\"\"b=c+d\"\"\"]\n\n      # Now for the above python codes, values of 'b', 'c' and 'd' \n      # are a dependency. Therefore\n      \n      >>> dependencies = [\"\"\"b=10\"\"\", \"\"\"c=10\\nd=20\\n\"\"\"] \n      \n      # try to keep one statement only inside \"\"\"...\"\"\", \n      # but if need be, then you can also put multiple \n      # statements followed by '\\n'. Like \"\"\"c=10\\nd=20\\n\"\"\"\n\n      # and now we will execute them with the loading bar as the \n      # front.\n      \n      >>> from wrapper_bar.wrapper import Wrapper\n      >>> w = Wrapper(\"Loading:\")\n      >>> w.pyShellWrapper(pythoncodes, dependencies) # this will output the following:\n      Loading: |\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593|Time: 0:00:10\n      \n      # To fetch the outputs, we will use a property 'pyShellWrapperResults' \n      # defined under the `Wrapper Class`\n\n      >>> a = w.pyShellWrapperResults['a'] # this will be 20\n      >>> b = w.pyShellWrapperResults['b'] # this will be 30\n      ```\n\n## Uninstall\n\nTo uninstall `wrapper-bar`, use pip.\n\n```bash\npip uninstall wrapper-bar\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Soumyo Deep Gupta  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Progress Bar with command wrapping",
    "version": "0.1.3",
    "project_urls": {
        "Documentation": "https://d33pster.github.io/wrapper-bar/",
        "GitHub": "https://github.com/d33pster/wrapper-bar",
        "Issues": "https://github.com/d33pster/wrapper-bar/issues"
    },
    "split_keywords": [
        "d33pster",
        " progress-bar",
        " wrapper-bar",
        " wrap commands"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7f5f2650ec60edb4f2010da4fde9cf3edead4285acd887956403da294483314d",
                "md5": "705adf42618b2da0ce32ad0dd27889a6",
                "sha256": "0f2d8e9b1c329edffea4297ad179390b2e754cdf3c13ad17bdd1025dfcbe5b48"
            },
            "downloads": -1,
            "filename": "wrapper_bar-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "705adf42618b2da0ce32ad0dd27889a6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7119,
            "upload_time": "2024-04-23T07:02:21",
            "upload_time_iso_8601": "2024-04-23T07:02:21.712145Z",
            "url": "https://files.pythonhosted.org/packages/7f/5f/2650ec60edb4f2010da4fde9cf3edead4285acd887956403da294483314d/wrapper_bar-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aa956c9ee284a25d752b268b79876b30bf2faaf07b510863f8e32852ebbf0e39",
                "md5": "22f22a96a1cd709692aa888158739d41",
                "sha256": "a63fc30f676a4a6ab3d649e05b519995e0eda0bc1112fd9f5f021c07fe7cd3f9"
            },
            "downloads": -1,
            "filename": "wrapper_bar-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "22f22a96a1cd709692aa888158739d41",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 5923,
            "upload_time": "2024-04-23T07:02:23",
            "upload_time_iso_8601": "2024-04-23T07:02:23.576301Z",
            "url": "https://files.pythonhosted.org/packages/aa/95/6c9ee284a25d752b268b79876b30bf2faaf07b510863f8e32852ebbf0e39/wrapper_bar-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-23 07:02:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "d33pster",
    "github_project": "wrapper-bar",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "wrapper-bar"
}
        
Elapsed time: 0.25024s