Metadata-Version: 2.1
Name: delayviewer
Version: 0.1.0
Summary: Several mechanisms to time and view progress of execution/runtime delays in Python
Author-email: Ed Waldner <waldevburry@proton.me>
Maintainer-email: Ed Waldner <waldevburry@proton.me>
Project-URL: Homepage, https://github.com/ew98/delayviewer
Project-URL: Documentation, https://github.com/ew98/delayviewer/wiki/DelayViewer
Project-URL: Issues, https://github.com/ew98/delayviewer/issues
Keywords: util,utility
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: argcomplete
Requires-Dist: quickcolor
Requires-Dist: showexception

# DelayViewer

**DelayViewer** is a Python assistant for showing progress info visually within the shell running a python command with long exposure. This library provides a simple spinner graphic and a stopwatch. The predominant use case is to display progress for sections within a decorated function.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install **delayviewer**.

```bash
pip install delayviewer
```


## Spinner Usage
```python
from delayviewer.spinner import handle_spinner
import time

@handle_spinner
def test_spinner(spinner=None):
    spinner.start('delaying 5 sec')
    time.sleep(5)
    spinner.stop()

test_spinner()
```

## Stopwatch Usage
```python
from delayviewer.stopwatch import handle_stopwatch
import time

@handle_stopwatch
def test_stopwatch(stopwatch=None):
    stopwatch.start('clocking 5 sec')
    time.sleep(5)
    stopwatch.stop('Finished timing!')

test_stopwatch()
```


## CLI Utility

The following CLI is included with this package for testing the various progress and timing indicators.

```bash
# dlyview -h
usage: dlyview [-h] {spinner,stopwatch,time.show,sleep.ticks} ...

-.-.-. Delay viewer elements for python scripts

positional arguments:
  {spinner,stopwatch,time.show,sleep.ticks}
    spinner             test Spinner graphic for viewing thru execution delays
    stopwatch           test StopWatch for viewing thru execution delays
    time.show           test time show wrapper
    sleep.ticks         test sleeping ticks progress viewer

options:
  -h, --help            show this help message and exit

.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
```


## License

[MIT](https://choosealicense.com/licenses/mit/)


## Acknowledgements

Thanks to several posts on StackOverflow regarding basic Spinner class implementation. Took that concept and generated the Stopwatch class to mimic behavior.
