Registry / devops / nornir-utils

nornir-utils

JSON →
library0.2.0pypypi✓ verified 83d ago

A collection of plugins and utility functions for the Nornir automation framework that require no external dependencies beyond Nornir itself. Current version 0.2.0, released in 2020. Maintenance mode.

pip install nornir-utils
INSTALL
IMPORT
SIG · NORNIR-UTILS
N
nornir-utils
devopspythonv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

print_result
from nornir_utils.plugins.functions import print_result
from nornir_utils import print_result
print_result is in plugins.functions submodule
print_title
from nornir_utils.plugins.functions import print_title
InventoryDefaultCredentials
from nornir_utils.plugins.inventory import InventoryDefaultCredentials

Initialize Nornir with a config file, run a task, and print the result using nornir_utils.

from nornir import InitNornir from nornir_utils.plugins.functions import print_result nr = InitNornir(config_file='config.yaml') result = nr.run(task=lambda task: task.run(task="netmiko_send_command", command_string="show version")) print_result(result)
Debug
Known issues
breakingnornir-utils 0.2.0 requires Python >=3.6.2,<4.0.0 and Nornir >=3.0.0. Incompatible with Python 3.10+ due to Nornir dependency restrictions.
fix
Use Python 3.6-3.9. For Python 3.10+, consider upgrading to Nornir 3.x compatible versions or use alternatives.
affects: 0.2.0
deprecatedThe plugin 'nornir_utils.plugins.tasks.data.LoadYAML' and other data plugins may be deprecated in favor of Nornir's built-in capabilities.
fix
Check Nornir's own functions for data loading.
affects: >=0.2.0
gotchaImporting functions directly from nornir_utils (e.g., 'from nornir_utils import print_result') will fail. Must use full submodule path.
fix
Import from nornir_utils.plugins.functions import print_result
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'nornir_utils'
Package not installed or installed in wrong environment.
fix
Run 'pip install nornir-utils' in the correct Python environment.
ImportError: cannot import name 'print_result' from 'nornir_utils'
Wrong import path – print_result is in a submodule.
fix
Use 'from nornir_utils.plugins.functions import print_result' instead.
Upgrade
Version history
0.2.0latest on PyPI · released Apr 9, 2022
Audit
Dependencies
nornirrequiredCore dependency for Nornir-based automation
Agent activity
2 hits · last 30 days
node
2
Resources

No resource links recorded.

nornir-utils — pip install nornir-utils · libregistry