Name | dashbar JSON |
Version |
2.1
JSON |
| download |
home_page | https://github.com/xyzpw/dashbar/ |
Summary | A progress-bar designed to be useful and easy to use. |
upload_time | 2024-06-01 10:20:59 |
maintainer | xyzpw |
docs_url | None |
author | xyzpw |
requires_python | >=3.7 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# dashbar
![PyPI - Version](https://img.shields.io/pypi/v/dashbar)
![Pepy Total Downloads](https://img.shields.io/pepy/dt/dashbar?color=red)
![GitHub repo size](https://img.shields.io/github/repo-size/xyzpw/dashbar)<br/><br/>
A progress-bar designed to be useful and easy to use.<br/><br/>
![dashbar-demo-preview](https://github.com/xyzpw/dashbar/assets/76017734/d5a3bd52-2bc5-455d-ba63-fe28249defe8)
## Usage
### Iterating
To start dashbar, execute the following code:
```python
for i in dashbar.dash(10, dash_type="pipe", desc="example"):
time.sleep(1/10) #completion after one second
if i == 5:
dashbar.status("half-way complete")
```
If the progress is large, the `autodash` function can be used, which adjusts the step count to fit the terminal:
```python
for i in dashbar.autodash(10):
time.sleep(1/10)
if i == 8:
dashbar.log("eighty percent complete")
```
### Customizing dashbar
Dashbars can be customized with the following code:
```python
dashbar.customize(element="filler", value=" ")
```
List of dashbars:
- classic
- arrow
- box
- circle_charger
- box_charger
- striped
- dollar
- box_shade
- pipe
- heart
- radioactive
- benzene
- custom
List of dashbar elements:
- start
- head
- trail
- filler
- finish
### Building a Dashbar
Dashbars can be built via the `Dashbar` class:
```python
bar = dashbar.Dashbar(10, "box_shade")
for i in range(100):
if i%10 == 0:
bar.update(1, display=True)
time.sleep(1/20) #completion after five seconds
```
Raw data
{
"_id": null,
"home_page": "https://github.com/xyzpw/dashbar/",
"name": "dashbar",
"maintainer": "xyzpw",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "xyzpw",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/02/af/2f88672added663bf78b4be8ac81aea73cfcc5d2a554e586fa229b6d3b27/dashbar-2.1.tar.gz",
"platform": null,
"description": "# dashbar\n![PyPI - Version](https://img.shields.io/pypi/v/dashbar)\n![Pepy Total Downloads](https://img.shields.io/pepy/dt/dashbar?color=red)\n![GitHub repo size](https://img.shields.io/github/repo-size/xyzpw/dashbar)<br/><br/>\nA progress-bar designed to be useful and easy to use.<br/><br/>\n![dashbar-demo-preview](https://github.com/xyzpw/dashbar/assets/76017734/d5a3bd52-2bc5-455d-ba63-fe28249defe8)\n## Usage\n### Iterating\nTo start dashbar, execute the following code:\n```python\nfor i in dashbar.dash(10, dash_type=\"pipe\", desc=\"example\"):\n time.sleep(1/10) #completion after one second\n if i == 5:\n dashbar.status(\"half-way complete\")\n```\nIf the progress is large, the `autodash` function can be used, which adjusts the step count to fit the terminal:\n```python\nfor i in dashbar.autodash(10):\n time.sleep(1/10)\n if i == 8:\n dashbar.log(\"eighty percent complete\")\n```\n\n### Customizing dashbar\nDashbars can be customized with the following code:\n```python\ndashbar.customize(element=\"filler\", value=\" \")\n```\nList of dashbars:\n- classic\n- arrow\n- box\n- circle_charger\n- box_charger\n- striped\n- dollar\n- box_shade\n- pipe\n- heart\n- radioactive\n- benzene\n- custom\n\nList of dashbar elements:\n- start\n- head\n- trail\n- filler\n- finish\n\n### Building a Dashbar\nDashbars can be built via the `Dashbar` class:\n```python\nbar = dashbar.Dashbar(10, \"box_shade\")\nfor i in range(100):\n if i%10 == 0:\n bar.update(1, display=True)\n time.sleep(1/20) #completion after five seconds\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A progress-bar designed to be useful and easy to use.",
"version": "2.1",
"project_urls": {
"Homepage": "https://github.com/xyzpw/dashbar/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f4ea42797f3a02941a957f38ae4c26f146b32d5ade154786938b3cbdc678e9cd",
"md5": "c225fa50ee20216bc8f7ca6265d68e1e",
"sha256": "ba5d321c044d4fc18a6cd4765681a0324a8a653c7be7dc2d4e2e5d59e3f64a2e"
},
"downloads": -1,
"filename": "dashbar-2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c225fa50ee20216bc8f7ca6265d68e1e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 5992,
"upload_time": "2024-06-01T10:20:57",
"upload_time_iso_8601": "2024-06-01T10:20:57.657667Z",
"url": "https://files.pythonhosted.org/packages/f4/ea/42797f3a02941a957f38ae4c26f146b32d5ade154786938b3cbdc678e9cd/dashbar-2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "02af2f88672added663bf78b4be8ac81aea73cfcc5d2a554e586fa229b6d3b27",
"md5": "96408fe5e8a09a884dbe96bad56eea8a",
"sha256": "210b0189bd70b928ebfb84ea63791aeb96a5d2710b9b53c7b9387b4868f86717"
},
"downloads": -1,
"filename": "dashbar-2.1.tar.gz",
"has_sig": false,
"md5_digest": "96408fe5e8a09a884dbe96bad56eea8a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 4922,
"upload_time": "2024-06-01T10:20:59",
"upload_time_iso_8601": "2024-06-01T10:20:59.147620Z",
"url": "https://files.pythonhosted.org/packages/02/af/2f88672added663bf78b4be8ac81aea73cfcc5d2a554e586fa229b6d3b27/dashbar-2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-01 10:20:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "xyzpw",
"github_project": "dashbar",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "dashbar"
}