Nornir offers Python-based network-management automation

The alternative to Ansible promises less work for automation developers

Nornir offers Python-based network-management automation
monsitj / Getty Images

Nornir, an automation framework that uses Python directly, provides an alternative to other automation frameworks that use their own domain-specific language (DSL).

The framework can dispatch tasks to devices and nodes, deal with inventory when the user has host information, and support the writing of plugins. For troubleshooting, users can use existing debug tools directly from Python.

Cisco systems engineer Dmitry Figol, a Nornir contributor, says Nornir is more flexible than Red Hat’s Ansible, an IT automation language that uses YAML running on top of Python. Figol claims these benefits for Nornir:

  • It provides an abstraction for inventory, including hosts and groups, and concurrent task execution. Developers do not have to write their own threading.
  • Nornir is just another Python library that can be imported.
  • It is flexibile and extensibie.
  • Any troubleshooting, debugging, or testing tool can be used from the Python ecosystem.
  • Existing libraries, including netmiko and napalm, are used for connections.
  • Opened connections are automatically closed.
  • Nornir can be integrated with Python frameworks such as Flask or Django. For networking testing, it can integrate with the Pytest framework.

Nornir can run as a standalone script and print results to the console. It also can integrate with a web framework. It does require knowledge of Python, Figol said.

Where to download Nornir

Nornir requires Python 3.6 or higher. You can install Nornir with pip, the Python package installer: pip install nornir.