PyLoadBar


NamePyLoadBar JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/schlopp96/PyLoadBar
SummaryCustomizeable loading sequence/progress bar generator, enabling users to customize start/finish messages, toggle sequence type, and set total iterations among other features.
upload_time2022-08-06 07:04:21
maintainer
docs_urlNone
authorschlopp96
requires_python
licenseGPL v3.0
keywords python load bar loading sequence progress progress-bar simple easy utilities package module tqdm pyloadbar developer tool
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyLoadBar

> _**Loading sequence/progress bar generator with options for users to customize start/finish messages, toggle between bar/text sequences, and set total iterations among other features.**_

---

## About

- Useful for small intermittent pauses between console text returns, or visualizing the progress of a long-running process.

- Users can choose between two different loading sequences:

  - **A.** _Progress-bar_ style loading sequence
  - **B.** _Animated-text_ style loading sequence

- When instantiating a `PyLoadBar` object, you may set the type of loading sequence using the `bar_sequence: bool` parameter.

- Once initialized, run the loading sequence using the `start()` method, and set sequence configuration using parameters.

- Messages can be customized by passing custom strings to the `msg_loading: str` and `msg_complete: str` parameters respectively.

  - The loading message defaults to `"Loading..."`
  - The completion message defaults to `"Done!"`

- You may apply a label to the progress bar using the `label: str` parameter (defaults to `None`).

  - **NOTE:** `bar_sequence: bool` must be set to `True` for a label to be assigned to the progress bar.

  - If `bar_sequence: bool` is `False`, the _progress-bar sequence_ will **not** be used, and the _animated text-based_ loading sequence **will** be used instead.

- When calling the `start()` method and using the _progress-bar_ sequence, the time taken to complete each iteration can be determined using the `min_iter: float` and `max_iter: float` parameters.

  - Each iteration length is randomized to a value between `min_iter: float` and `max_iter: float` seconds.
    - e.g. `start(min_iter=0.5, max_iter=1.5)` would take anywhere between 0.5 - 1.5 seconds to complete a single iteration.

- The _text-based_ loading sequence displays the loading message followed by incrementing dots, all printed to the same line.
  - Set number of seconds to complete a single text-sequence iteration using `txt_iter_speed: float`.
    - Defaults to `0.5` seconds per animation cycle.

---

## Installing PyLoadBar

### Using pip

> _Easiest_ method. Highly recommended over manual installation.

- Run the following to install:

  ```shell
  pip install PyLoadBar
  ```

- You should now be able to import `PyLoadBar` directly to your application.

---

### Manual Installation

> _Not_ recommended.

**1a.** Download the latest source code `.zip` archive from the PyLoadBar GitHub [releases](https://github.com/schlopp96/PyLoadBar/releases/latest) page and extract contents to the desired location.

- **OR:**

**1b.** Clone repository with the git client of your preference with:

```shell
gh repo clone schlopp96/PyLoadBar
```

**2.** Navigate to the directory containing extracted contents, and open said folder within a terminal.

**3.** Enter `pip install -r requirements.txt` to install all dependencies for this package.

**4.** Finally, move the `"PyLoadBar-Vx.x.x"` directory to your global Python 3rd-party package installation directory to be able to import `PyLoadBar` like any other module:

- `"~Python/Lib/site-packages/HERE"`

**5.** Done!

---

## Usage

- `PyLoadBar` is _very_ simple to use.

- Within a `.py` project, simply import the `PyLoadBar` module to start using your custom loading sequence.

- Example of standard loading sequence with `label` set to `'Solving'`:

  ```python
    >>> from PyLoadBar import PyLoadBar

    >>> important_bar = PyLoadBar() # Initialize a new `PyLoadBar` instance.

    >>> important_bar.start(msg_loading='Important Stuff Happening', msg_complete='Day Saved!', label='Saving Day', min_iter=0.05, max_iter=1.0, iter_total=10) # Call `start` method to begin loading sequence.

  ```

    ![alt](./assets/bar_sequence.gif)

- Example of animated-text-based loading sequence:

  ```python
    >>> from PyLoadBar import PyLoadBar

    >>> bar = PyLoadBar(bar_sequence=False) # Initialize loading sequence.

    >>> bar.start(msg_loading='Loading', msg_complete='Done!', iter_total=1, txt_iter_speed=1) # Start animated-text loading sequence.

  ```

    ![alt](./assets/text_sequence.gif)

---

## Contact

- If you have any questions, comments, or concerns that cannot be addressed through the [project's GitHub repository](https://github.com/schlopp96/PyLoadBar), please feel free to contact me through my email address:

  - `schloppdaddy@gmail.com`

---



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/schlopp96/PyLoadBar",
    "name": "PyLoadBar",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python, load, bar, loading, sequence, progress, progress-bar, simple, easy, utilities, package, module, tqdm, pyloadbar, developer, tool",
    "author": "schlopp96",
    "author_email": "schloppdaddy@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/55/dd/13c76cb48af76f72cad449edfd42b8a6130fbaecc651d9238049311a4276/PyLoadBar-0.2.0.tar.gz",
    "platform": null,
    "description": "# PyLoadBar\n\n> _**Loading sequence/progress bar generator with options for users to customize start/finish messages, toggle between bar/text sequences, and set total iterations among other features.**_\n\n---\n\n## About\n\n- Useful for small intermittent pauses between console text returns, or visualizing the progress of a long-running process.\n\n- Users can choose between two different loading sequences:\n\n  - **A.** _Progress-bar_ style loading sequence\n  - **B.** _Animated-text_ style loading sequence\n\n- When instantiating a `PyLoadBar` object, you may set the type of loading sequence using the `bar_sequence: bool` parameter.\n\n- Once initialized, run the loading sequence using the `start()` method, and set sequence configuration using parameters.\n\n- Messages can be customized by passing custom strings to the `msg_loading: str` and `msg_complete: str` parameters respectively.\n\n  - The loading message defaults to `\"Loading...\"`\n  - The completion message defaults to `\"Done!\"`\n\n- You may apply a label to the progress bar using the `label: str` parameter (defaults to `None`).\n\n  - **NOTE:** `bar_sequence: bool` must be set to `True` for a label to be assigned to the progress bar.\n\n  - If `bar_sequence: bool` is `False`, the _progress-bar sequence_ will **not** be used, and the _animated text-based_ loading sequence **will** be used instead.\n\n- When calling the `start()` method and using the _progress-bar_ sequence, the time taken to complete each iteration can be determined using the `min_iter: float` and `max_iter: float` parameters.\n\n  - Each iteration length is randomized to a value between `min_iter: float` and `max_iter: float` seconds.\n    - e.g. `start(min_iter=0.5, max_iter=1.5)` would take anywhere between 0.5 - 1.5 seconds to complete a single iteration.\n\n- The _text-based_ loading sequence displays the loading message followed by incrementing dots, all printed to the same line.\n  - Set number of seconds to complete a single text-sequence iteration using `txt_iter_speed: float`.\n    - Defaults to `0.5` seconds per animation cycle.\n\n---\n\n## Installing PyLoadBar\n\n### Using pip\n\n> _Easiest_ method. Highly recommended over manual installation.\n\n- Run the following to install:\n\n  ```shell\n  pip install PyLoadBar\n  ```\n\n- You should now be able to import `PyLoadBar` directly to your application.\n\n---\n\n### Manual Installation\n\n> _Not_ recommended.\n\n**1a.** Download the latest source code `.zip` archive from the PyLoadBar GitHub [releases](https://github.com/schlopp96/PyLoadBar/releases/latest) page and extract contents to the desired location.\n\n- **OR:**\n\n**1b.** Clone repository with the git client of your preference with:\n\n```shell\ngh repo clone schlopp96/PyLoadBar\n```\n\n**2.** Navigate to the directory containing extracted contents, and open said folder within a terminal.\n\n**3.** Enter `pip install -r requirements.txt` to install all dependencies for this package.\n\n**4.** Finally, move the `\"PyLoadBar-Vx.x.x\"` directory to your global Python 3rd-party package installation directory to be able to import `PyLoadBar` like any other module:\n\n- `\"~Python/Lib/site-packages/HERE\"`\n\n**5.** Done!\n\n---\n\n## Usage\n\n- `PyLoadBar` is _very_ simple to use.\n\n- Within a `.py` project, simply import the `PyLoadBar` module to start using your custom loading sequence.\n\n- Example of standard loading sequence with `label` set to `'Solving'`:\n\n  ```python\n    >>> from PyLoadBar import PyLoadBar\n\n    >>> important_bar = PyLoadBar() # Initialize a new `PyLoadBar` instance.\n\n    >>> important_bar.start(msg_loading='Important Stuff Happening', msg_complete='Day Saved!', label='Saving Day', min_iter=0.05, max_iter=1.0, iter_total=10) # Call `start` method to begin loading sequence.\n\n  ```\n\n    ![alt](./assets/bar_sequence.gif)\n\n- Example of animated-text-based loading sequence:\n\n  ```python\n    >>> from PyLoadBar import PyLoadBar\n\n    >>> bar = PyLoadBar(bar_sequence=False) # Initialize loading sequence.\n\n    >>> bar.start(msg_loading='Loading', msg_complete='Done!', iter_total=1, txt_iter_speed=1) # Start animated-text loading sequence.\n\n  ```\n\n    ![alt](./assets/text_sequence.gif)\n\n---\n\n## Contact\n\n- If you have any questions, comments, or concerns that cannot be addressed through the [project's GitHub repository](https://github.com/schlopp96/PyLoadBar), please feel free to contact me through my email address:\n\n  - `schloppdaddy@gmail.com`\n\n---\n\n\n",
    "bugtrack_url": null,
    "license": "GPL v3.0",
    "summary": "Customizeable loading sequence/progress bar generator, enabling users to customize start/finish messages, toggle sequence type, and set total iterations among other features.",
    "version": "0.2.0",
    "split_keywords": [
        "python",
        " load",
        " bar",
        " loading",
        " sequence",
        " progress",
        " progress-bar",
        " simple",
        " easy",
        " utilities",
        " package",
        " module",
        " tqdm",
        " pyloadbar",
        " developer",
        " tool"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "5bcbb272f617691fc0085bff68ce4ec3",
                "sha256": "4217e789aee26a636cada13f84bc5665b20ea44dfbaece6216d9b43729da5fdb"
            },
            "downloads": -1,
            "filename": "PyLoadBar-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5bcbb272f617691fc0085bff68ce4ec3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 18830,
            "upload_time": "2022-08-06T07:04:19",
            "upload_time_iso_8601": "2022-08-06T07:04:19.235493Z",
            "url": "https://files.pythonhosted.org/packages/92/78/485cd301d99a3a4f5ad960e59e96328c10f36456fda0cd466e861512faab/PyLoadBar-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "526beb3efd8808946d3e8099e902bfd8",
                "sha256": "fe2fab576b7e23c10a20f273d29347ae7a0e5f4a38af0d52d30515478e122f79"
            },
            "downloads": -1,
            "filename": "PyLoadBar-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "526beb3efd8808946d3e8099e902bfd8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 104529,
            "upload_time": "2022-08-06T07:04:21",
            "upload_time_iso_8601": "2022-08-06T07:04:21.132521Z",
            "url": "https://files.pythonhosted.org/packages/55/dd/13c76cb48af76f72cad449edfd42b8a6130fbaecc651d9238049311a4276/PyLoadBar-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-08-06 07:04:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "schlopp96",
    "github_project": "PyLoadBar",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "pyloadbar"
}
        
Elapsed time: 0.57176s