Skip to main content

nornir_rich

Install

pip install nornir-rich

Usage

Features

  • Print functions
    • print_result
    • print_failed_hosts
    • print_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 inventory

Print Result

Print Result

Progress Bar

Progress Bar

More examples

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nornir_rich-0.3.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nornir_rich-0.3.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file nornir_rich-0.3.0.tar.gz.

File metadata

  • Download URL: nornir_rich-0.3.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for nornir_rich-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2ca9401a8b744d4b2613e292bb3e3b44cc43d801bc001845b4beac763baa88f0
MD5 48c2cbbc627cc065c737a300f39ec4ea
BLAKE2b-256 d9867868b9a39ff14862339f0af1b0deb8ea0dd9375bfe762b2f212341fc9003

See more details on using hashes here.

File details

Details for the file nornir_rich-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: nornir_rich-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for nornir_rich-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d851efe31567630e53810dd60e3e9f614256f30cde97a59d0116d320dafcc4ea
MD5 d7330a32456a5c1fd443fc65ba0aa755
BLAKE2b-256 da01df76d3f85d3db6c5d88e46b7b7d9a3425f36f108a1598a699e6dce25d74d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.2.0

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page