# pynimbar
`pynimbar` is a Python package that provides a simple and customizable loading animation for console-based applications. The package allows you to create loading animations with custom text, as well as adjust the animation speed and style.
## Installation
You can install `pynimbar` using pip:
```sh
pip install pynimbar
```
## Usage
`pynimbar` provides a context manager that allows you to use the loading animation as a context manager. This can be useful if you want to ensure that the loading animation is automatically stopped when an error occurs or when your code finishes executing. For example:
```py
from pynimbar import loading_animation
from time import sleep
with loading_animation('Processing data...'):
sleep(5)
```
## Customization
You can customize the appearance and behavior of the loading animation using the following parameters:
- `text` (str): The text to display during the animation.
- `success_msg` (str, optional): The text to display when the animation is done. Defaults to `'ok'`.
- `animation_frequency` (float, optional): The frequency of the animation. Defaults to `0.1`.
- `break_on_error` (bool, optional): Whether to break on error. Defaults to `True`.
- `verbose_errors` (bool, optional): Whether to print the error traceback. Defaults to `False`.
- `frames` (str, optional): The frames of the animation. Defaults to `'|/-\\'`.
- `time_it` (bool, optional): Whether to time the execution of the code block. Defaults to False.
- `time_it_live` (bool, optional): Whether to print the live execution time of the code block. Defaults to False.
## Contributing
If you have any suggestions or improvements for pynimbar, feel free to submit a pull request or open an issue on the [GitHub repository](https://github.com/gtkacz/pynimbar). We appreciate any feedback or contributions!
## Example
![Example functionality](/img/example.gif)
Raw data
{
"_id": null,
"home_page": null,
"name": "pynimbar",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "Gabriel Mitelman Tkacz <gmtkacz@proton.me>",
"keywords": "animation, context manager, error handling",
"author": null,
"author_email": "Gabriel Mitelman Tkacz <gmtkacz@proton.me>",
"download_url": "https://files.pythonhosted.org/packages/8b/40/39d35f2bd212b7062cb9a7d11a8dcf6f30d67e7c969ca046f03790c3244d/pynimbar-1.1.1.tar.gz",
"platform": null,
"description": "# pynimbar\r\n\r\n`pynimbar` is a Python package that provides a simple and customizable loading animation for console-based applications. The package allows you to create loading animations with custom text, as well as adjust the animation speed and style.\r\n\r\n## Installation\r\n\r\nYou can install `pynimbar` using pip:\r\n```sh\r\npip install pynimbar\r\n```\r\n\r\n## Usage\r\n`pynimbar` provides a context manager that allows you to use the loading animation as a context manager. This can be useful if you want to ensure that the loading animation is automatically stopped when an error occurs or when your code finishes executing. For example:\r\n```py\r\nfrom pynimbar import loading_animation\r\nfrom time import sleep\r\n\r\nwith loading_animation('Processing data...'):\r\n sleep(5)\r\n```\r\n\r\n## Customization\r\nYou can customize the appearance and behavior of the loading animation using the following parameters:\r\n- `text` (str): The text to display during the animation.\r\n- `success_msg` (str, optional): The text to display when the animation is done. Defaults to `'ok'`.\r\n- `animation_frequency` (float, optional): The frequency of the animation. Defaults to `0.1`.\r\n- `break_on_error` (bool, optional): Whether to break on error. Defaults to `True`.\r\n- `verbose_errors` (bool, optional): Whether to print the error traceback. Defaults to `False`.\r\n- `frames` (str, optional): The frames of the animation. Defaults to `'|/-\\\\'`.\r\n- `time_it` (bool, optional): Whether to time the execution of the code block. Defaults to False.\r\n- `time_it_live` (bool, optional): Whether to print the live execution time of the code block. Defaults to False.\r\n\r\n## Contributing\r\nIf you have any suggestions or improvements for pynimbar, feel free to submit a pull request or open an issue on the [GitHub repository](https://github.com/gtkacz/pynimbar). We appreciate any feedback or contributions!\r\n\r\n## Example\r\n![Example functionality](/img/example.gif)\r\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Make your Python scripts more user friendly with loading animations",
"version": "1.1.1",
"project_urls": {
"Issues": "https://github.com/gtkacz/pynimbar/issues",
"Repository": "https://github.com/gtkacz/pynimbar.git"
},
"split_keywords": [
"animation",
" context manager",
" error handling"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8c3b229fd9e29c70824506d7c6b0038315d66a5a847c5daf415feecf0d5f3c0c",
"md5": "f95effd850e9655c74d1c769bac954c0",
"sha256": "6ae0bd12cae222370a927a702e9585991e57b8347b3a5f1b06698f6982cc4b8c"
},
"downloads": -1,
"filename": "pynimbar-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f95effd850e9655c74d1c769bac954c0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 4335,
"upload_time": "2024-05-17T16:51:28",
"upload_time_iso_8601": "2024-05-17T16:51:28.877473Z",
"url": "https://files.pythonhosted.org/packages/8c/3b/229fd9e29c70824506d7c6b0038315d66a5a847c5daf415feecf0d5f3c0c/pynimbar-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8b4039d35f2bd212b7062cb9a7d11a8dcf6f30d67e7c969ca046f03790c3244d",
"md5": "d0c2e27017447e6dfe9fcb4653d463b7",
"sha256": "0d83d8b45d09b720d89fb4ce2b47db18c0d3f9cb5f435418915faf6c46ae0a7e"
},
"downloads": -1,
"filename": "pynimbar-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "d0c2e27017447e6dfe9fcb4653d463b7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3972,
"upload_time": "2024-05-17T16:51:30",
"upload_time_iso_8601": "2024-05-17T16:51:30.703162Z",
"url": "https://files.pythonhosted.org/packages/8b/40/39d35f2bd212b7062cb9a7d11a8dcf6f30d67e7c969ca046f03790c3244d/pynimbar-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-17 16:51:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gtkacz",
"github_project": "pynimbar",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pynimbar"
}