nornir_rich
Install
pip install nornir-rich
Usage
Features
- Print functions
print_resultprint_failed_hostsprint_inventory
- Processors
progressbar
Print example
from nornir_rich.functions import print_result
results = nr.run(
task=hello_world
)
print_result(results)
print_result(results, vars=["diff", "result", "name", "exception", "severity_level"])
Progress bar example
from time import sleep
from nornir_rich.progress_bar import RichProgressBar
def random_sleep(task: Task) -> Result:
delay = randrange(10)
sleep(delay)
return Result(host=task.host, result=f"{delay} seconds delay")
nr_with_processors = nr.with_processors([RichProgressBar()])
result = nr_with_processors.run(task=random_sleep)
Images
Print Inventory
Print Result
Progress Bar
More examples
Metadata
Release files for nornir-rich 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nornir_rich-0.3.0.tar.gz | 8.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nornir_rich-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.1 kB
Release files / nornir_rich-0.3.0.tar.gz
| Download URL | nornir_rich-0.3.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ca9401a8b744d4b2613e292bb3e3b44cc43d801bc001845b4beac763baa88f0
|
|
BLAKE2b-256 checksum How to use checksums |
d9867868b9a39ff14862339f0af1b0deb8ea0dd9375bfe762b2f212341fc9003
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Release files / nornir_rich-0.3.0-py3-none-any.whl
| Download URL | nornir_rich-0.3.0-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d851efe31567630e53810dd60e3e9f614256f30cde97a59d0116d320dafcc4ea
|
|
BLAKE2b-256 checksum How to use checksums |
da01df76d3f85d3db6c5d88e46b7b7d9a3425f36f108a1598a699e6dce25d74d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|