| Name | ascibar JSON |
| Version |
0.1.0
JSON |
| download |
| home_page | https://github.com/mouhamaddev/ascibar |
| Summary | A Lightweight Python library for creating customizable ASCII-based progress bars in terminal applications. |
| upload_time | 2024-09-01 09:21:41 |
| maintainer | None |
| docs_url | None |
| author | mouhamaddev |
| requires_python | >=3.6 |
| license | None |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# Ascibar
Ascibar is a lightweight Python library designed for creating customizable ASCII-based progress bars in terminal applications. It offers an easy way to enhance your command-line interface with visually appealing and informative progress indicators.
## Version
Current version: **0.1**
## Installation
You can install `ascibar` via pip. Run the following command in your terminal:
```bash
pip install ascibar
```
## Usage
A basic example of how to use `ascibar`:
```python
from ascibar import CustomProgressBar
import time
total = 100
# Define your custom styles
custom_loader_style = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
custom_bar_style = '█'
# Enable components
enable_components = {
"loader": True,
"bar": True,
"percentage": True,
"finished_tasks": True,
}
# Create the progress bar with custom settings
progress = CustomProgressBar(
total,
loading_text="Processing...",
done_text="Task completed!",
loader_style=custom_loader_style,
bar_style=custom_bar_style,
enable_components=enable_components
)
# Run the progress bar
for i in range(total + 1):
progress.print_progress_bar(i)
time.sleep(0.1)
```
### Parameters
- **`total`**: The total number of iterations (e.g., 100).
- **`loading_text`**: Text to display while loading (default: `"Loading..."`).
- **`done_text`**: Text to display when done (default: `"Done!"`).
- **`loader_style`**: List of characters for the loader animation (default: `['-', '\\', '|', '/']`).
- **`bar_style`**: Character to use for the progress bar (default: `'#'`).
- **`enable_components`**: Dictionary to enable/disable components:
- `"loader"`: Show loader animation (default: `True`).
- `"bar"`: Show progress bar (default: `True`).
- `"percentage"`: Show percentage complete (default: `False`).
- `"finished_tasks"`: Show finished tasks count (default: `False`).
## License
This project is licensed under the GNU License. See the [LICENSE](LICENSE) file for details.
## Contributing
Contributions are welcome! If you have suggestions, bug reports, or pull requests, please submit them via GitHub issues or pull requests.
Raw data
{
"_id": null,
"home_page": "https://github.com/mouhamaddev/ascibar",
"name": "ascibar",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "mouhamaddev",
"author_email": "mouhamaddev04@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d3/aa/d268189e7ba8e72c1297368faea028050887cab12445baed0b2d3dedd00e/ascibar-0.1.0.tar.gz",
"platform": null,
"description": "# Ascibar\n\nAscibar is a lightweight Python library designed for creating customizable ASCII-based progress bars in terminal applications. It offers an easy way to enhance your command-line interface with visually appealing and informative progress indicators.\n\n## Version\n\nCurrent version: **0.1**\n\n## Installation\n\nYou can install `ascibar` via pip. Run the following command in your terminal:\n\n```bash\npip install ascibar\n```\n\n## Usage\n\nA basic example of how to use `ascibar`:\n\n```python\nfrom ascibar import CustomProgressBar\nimport time\n\ntotal = 100\n\n# Define your custom styles\ncustom_loader_style = ['\u280b', '\u2819', '\u2839', '\u2838', '\u283c', '\u2834', '\u2826', '\u2827', '\u2807', '\u280f']\ncustom_bar_style = '\u2588'\n\n# Enable components\nenable_components = {\n \"loader\": True,\n \"bar\": True,\n \"percentage\": True,\n \"finished_tasks\": True,\n}\n\n# Create the progress bar with custom settings\nprogress = CustomProgressBar(\n total,\n loading_text=\"Processing...\",\n done_text=\"Task completed!\",\n loader_style=custom_loader_style,\n bar_style=custom_bar_style,\n enable_components=enable_components\n)\n\n# Run the progress bar\nfor i in range(total + 1):\n progress.print_progress_bar(i)\n time.sleep(0.1)\n```\n\n### Parameters\n\n- **`total`**: The total number of iterations (e.g., 100).\n- **`loading_text`**: Text to display while loading (default: `\"Loading...\"`).\n- **`done_text`**: Text to display when done (default: `\"Done!\"`).\n- **`loader_style`**: List of characters for the loader animation (default: `['-', '\\\\', '|', '/']`).\n- **`bar_style`**: Character to use for the progress bar (default: `'#'`).\n- **`enable_components`**: Dictionary to enable/disable components:\n - `\"loader\"`: Show loader animation (default: `True`).\n - `\"bar\"`: Show progress bar (default: `True`).\n - `\"percentage\"`: Show percentage complete (default: `False`).\n - `\"finished_tasks\"`: Show finished tasks count (default: `False`).\n\n## License\n\nThis project is licensed under the GNU License. See the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! If you have suggestions, bug reports, or pull requests, please submit them via GitHub issues or pull requests.\n",
"bugtrack_url": null,
"license": null,
"summary": "A Lightweight Python library for creating customizable ASCII-based progress bars in terminal applications.",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/mouhamaddev/ascibar"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d9e1f14efb1552f8342cfe0dc33359ab7125e0c437c2a651e6aa9284a67a9e41",
"md5": "1a758e8e7a5eb08cd612c654fc116e1e",
"sha256": "b485a03fe8aec8caca32772170f50f35a89b0a3e42e8528cf8f665cf5f844783"
},
"downloads": -1,
"filename": "ascibar-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1a758e8e7a5eb08cd612c654fc116e1e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 15466,
"upload_time": "2024-09-01T09:21:31",
"upload_time_iso_8601": "2024-09-01T09:21:31.875444Z",
"url": "https://files.pythonhosted.org/packages/d9/e1/f14efb1552f8342cfe0dc33359ab7125e0c437c2a651e6aa9284a67a9e41/ascibar-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d3aad268189e7ba8e72c1297368faea028050887cab12445baed0b2d3dedd00e",
"md5": "849e400e1cce55ef5eabf4bbaa68ecfa",
"sha256": "90f1cde1cb9d54540bad51b435e64a373e71f6c2ffc937e7c7b85af0676616c3"
},
"downloads": -1,
"filename": "ascibar-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "849e400e1cce55ef5eabf4bbaa68ecfa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 15132,
"upload_time": "2024-09-01T09:21:41",
"upload_time_iso_8601": "2024-09-01T09:21:41.192695Z",
"url": "https://files.pythonhosted.org/packages/d3/aa/d268189e7ba8e72c1297368faea028050887cab12445baed0b2d3dedd00e/ascibar-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-01 09:21:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mouhamaddev",
"github_project": "ascibar",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "ascibar"
}