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:
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:
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 to0.1.break_on_error(bool, optional): Whether to break on error. Defaults toTrue.verbose_errors(bool, optional): Whether to print the error traceback. Defaults toFalse.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. We appreciate any feedback or contributions!
Example
Release files for pynimbar 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pynimbar-1.1.1.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pynimbar-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.3 kB
Release files / pynimbar-1.1.1.tar.gz
| Download URL | pynimbar-1.1.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d83d8b45d09b720d89fb4ce2b47db18c0d3f9cb5f435418915faf6c46ae0a7e
|
|
BLAKE2b-256 checksum How to use checksums |
8b4039d35f2bd212b7062cb9a7d11a8dcf6f30d67e7c969ca046f03790c3244d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Release files / pynimbar-1.1.1-py3-none-any.whl
| Download URL | pynimbar-1.1.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ae0bd12cae222370a927a702e9585991e57b8347b3a5f1b06698f6982cc4b8c
|
|
BLAKE2b-256 checksum How to use checksums |
8c3b229fd9e29c70824506d7c6b0038315d66a5a847c5daf415feecf0d5f3c0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|