pyprogress-elunico


Namepyprogress-elunico JSON
Version 0.1.6 PyPI version JSON
download
home_pagehttps://github.com/elunico/pyprogress
SummaryA terminal progress printing utility
upload_time2024-09-14 17:56:08
maintainerNone
docs_urlNone
authorThomas Povinelli
requires_python>=3.6
licenseNone
keywords progress bar terminal
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyProgress

## General Use

A simple interface for terminal based progress updates

Begin by creating an instance with the starting and ending value

```python
import os

files = os.listdir('.')
bar = ProgressBar(0, len(files))
for file in files:
    bar.iterbegin('Processing file: {}'.format(file))
    process(file)
    bar.iterdone()
bar.done()
```

Manually call `ProgressBar.iterbegin([message])` before an iteration starts 
and call `ProgressBar.iterend()` when it completes or `ProgressBar.iterfail()` 
if it fails 

When all items complete use `ProgressBar.done()` to print a summary

## Alternative Use – Context Manager

ProgressBar instances can also be used as context managers

use a with statement on every iteration

```python
import os

files = os.listdir('.')
bar = ProgressBar(0, len(files), supress_exc=True)
for file in files:
    with bar:
        process(file)
bar.done()
```

Using the `supress_exc=True` argument will report statistic for failures
from raised exceptions but not raise the exception itself 

This is not necessary to use bar as a Context Manager but you must use it as a Context Manager to get the exception suppressing behavior

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/elunico/pyprogress",
    "name": "pyprogress-elunico",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "progress bar terminal",
    "author": "Thomas Povinelli",
    "author_email": "tompov227@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/59/4e/a765be7f152e44f1daa79b8a77ad74059abbb595f20c13e5d4cfd09f77e7/pyprogress_elunico-0.1.6.tar.gz",
    "platform": null,
    "description": "# PyProgress\n\n## General Use\n\nA simple interface for terminal based progress updates\n\nBegin by creating an instance with the starting and ending value\n\n```python\nimport os\n\nfiles = os.listdir('.')\nbar = ProgressBar(0, len(files))\nfor file in files:\n    bar.iterbegin('Processing file: {}'.format(file))\n    process(file)\n    bar.iterdone()\nbar.done()\n```\n\nManually call `ProgressBar.iterbegin([message])` before an iteration starts \nand call `ProgressBar.iterend()` when it completes or `ProgressBar.iterfail()` \nif it fails \n\nWhen all items complete use `ProgressBar.done()` to print a summary\n\n## Alternative Use \u2013 Context Manager\n\nProgressBar instances can also be used as context managers\n\nuse a with statement on every iteration\n\n```python\nimport os\n\nfiles = os.listdir('.')\nbar = ProgressBar(0, len(files), supress_exc=True)\nfor file in files:\n    with bar:\n        process(file)\nbar.done()\n```\n\nUsing the `supress_exc=True` argument will report statistic for failures\nfrom raised exceptions but not raise the exception itself \n\nThis is not necessary to use bar as a Context Manager but you must use it as a Context Manager to get the exception suppressing behavior\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A terminal progress printing utility",
    "version": "0.1.6",
    "project_urls": {
        "Homepage": "https://github.com/elunico/pyprogress"
    },
    "split_keywords": [
        "progress",
        "bar",
        "terminal"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "01bdbd1049b79de483267795512ed1184fc036135a2b7768b0a26bfca95c62f6",
                "md5": "980237903eb6fab42aa3abc0a7c33faf",
                "sha256": "73acf3bf35b19afd532b90f7f6668c8fa06bff92729d95b5988926c7b9367ecc"
            },
            "downloads": -1,
            "filename": "pyprogress_elunico-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "980237903eb6fab42aa3abc0a7c33faf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 3950,
            "upload_time": "2024-09-14T17:56:07",
            "upload_time_iso_8601": "2024-09-14T17:56:07.310148Z",
            "url": "https://files.pythonhosted.org/packages/01/bd/bd1049b79de483267795512ed1184fc036135a2b7768b0a26bfca95c62f6/pyprogress_elunico-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "594ea765be7f152e44f1daa79b8a77ad74059abbb595f20c13e5d4cfd09f77e7",
                "md5": "d9936f8449aba605cefbf25cbff59b00",
                "sha256": "65ba6b0a01f3db3cd88827ccad75cc3670d9c3cfd44815d1f2b33b054ba5a2a9"
            },
            "downloads": -1,
            "filename": "pyprogress_elunico-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "d9936f8449aba605cefbf25cbff59b00",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3728,
            "upload_time": "2024-09-14T17:56:08",
            "upload_time_iso_8601": "2024-09-14T17:56:08.893450Z",
            "url": "https://files.pythonhosted.org/packages/59/4e/a765be7f152e44f1daa79b8a77ad74059abbb595f20c13e5d4cfd09f77e7/pyprogress_elunico-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-14 17:56:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "elunico",
    "github_project": "pyprogress",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pyprogress-elunico"
}
        
Elapsed time: 1.05667s