Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Supported Versions PyPI version Weekly Build Ruff License: MIT

nornir_scrapli


Documentation: https://scrapli.github.io/nornir_scrapli

Source Code: https://github.com/scrapli/nornir_scrapli

Examples: https://github.com/scrapli/nornir_scrapli/tree/master/examples


nornir_scrapli -- scrapli's plugin for nornir

Key Features:

  • Easy: It's easy to get going with scrapli -- check out the documentation and example links above, and you'll be connecting to devices in no time.
  • Fast: Do you like to go fast? Of course you do! All of scrapli is built with speed in mind, but if you really feel the need for speed, check out the ssh2 transport plugin to take it to the next level!
  • Great Developer Experience: scrapli has great editor support thanks to being fully typed; that plus thorough docs make developing with scrapli a breeze.
  • Well Tested: Perhaps out of paranoia, but regardless of the reason, scrapli has lots of tests! Unit tests cover the basics, regularly ran functional tests connect to virtual routers to ensure that everything works IRL!
  • Pluggable: scrapli provides a pluggable transport system -- don't like the currently available transports, simply extend the base classes and add your own! Need additional device support? Create a simple "platform" in scrapli_community to easily add new device support!
  • But wait, there's more!: Have NETCONF devices in your environment, but love the speed and simplicity of scrapli? You're in luck! Check out scrapli_netconf!

Requirements

MacOS or *nix1, Python 3.10–3.14 (development defaults to Python 3.13)

From 1.6.0a1, nornir_scrapli requires Nornir 3.7.0a1 or later, the first Nornir release with the asyncio runner and capability-aware connection plugins (Nornir PR #1111). Both synchronous and asynchronous CLI/configuration plugins use the capability registry.

1 Although many parts of scrapli do run on Windows, Windows is not officially supported

Installation

nornir_scrapli uses semantic versions. The major version matches the scrapli major version. Install the release line that matches your scrapli version:

# scrapli v1
pip install "nornir-scrapli>=1,<2"

# scrapli v2
pip install "nornir-scrapli>=2,<3"

Each 1.x release, except pre-releases such as 1.6.0a1, is also published with a calendar version, such as 2026.10.30. Without a version constraint, pip install nornir-scrapli installs the latest calendar version, which uses scrapli v1. Calendar versions will later follow 2.x instead. The changelog heading of each release names both versions. See the versioning docs and issue #178 for details.

See the docs for other installation methods/details.

A simple Example

from nornir import InitNornir
from nornir_scrapli.tasks import send_command


nr = InitNornir(config_file="nornir_data/config.yaml")
command_results = nr.run(task=send_command, command="show version")

print("send_command result:")
print(command_results["iosxe-1"].result)

Asyncio tasks

Install the pre-release with the optional async SSH transport:

pip install "nornir-scrapli[asyncio]==1.6.0a1"

Use the same scrapli and scrapli_cfg inventory connection names. Leave extras.transport unset to use the mode-specific default (system for sync, asyncssh for asyncio), or configure a transport compatible with your chosen mode.

import asyncio

from nornir import InitNornir
from nornir_scrapli.async_tasks import send_command


async def main():
    async with InitNornir(
        config_file="nornir_data/config.yaml",
        runner={"plugin": "asyncio", "options": {"num_workers": 100}},
    ) as nr:
        return await nr.arun(task=send_command, command="show version")


results = asyncio.run(main())

Nornir owns connection mode binding: using a synchronous task on an established async connection, or the reverse, raises Nornir's ConnectionModeMismatchError. Use host.connection_mode(name) to query it and await host.aclose_connections() to clean up either or both execution modes. See the asyncio guide for configuration workflows and cleanup.

Metadata

Release files for nornir_scrapli 1.6.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nornir_scrapli 1.6.0a1
File Size Uploaded Provenance Actions
nornir_scrapli-1.6.0a1.tar.gz 19.0 kB Without provenance Details for nornir_scrapli-1.6.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nornir_scrapli 1.6.0a1
File Interpreter ABI Platform Actions
nornir_scrapli-1.6.0a1-py3-none-any.whl Python 3 none any Details for nornir_scrapli-1.6.0a1-py3-none-any.whl

Total release size: 56.2 kB

Release files / nornir_scrapli-1.6.0a1.tar.gz

Download URL nornir_scrapli-1.6.0a1.tar.gz
Size 19.0 kB
Tags Source
SHA-256 checksum
How to use checksums
45e90366e4bdd231b52c2d0447c919a9d5f9df94c6579dbc68d594339047a109
BLAKE2b-256 checksum
How to use checksums
7cc26db96fb989d7961cc90188cf538f3dec8db91221059a6399fee8f8811e8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / nornir_scrapli-1.6.0a1-py3-none-any.whl

Download URL nornir_scrapli-1.6.0a1-py3-none-any.whl
Size 37.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3aef49e0b686c6b2bef7093d0ff7f09632cc5153d416f39d0f5d05d6d37d1674
BLAKE2b-256 checksum
How to use checksums
b71beb06b895b970a24c784b0155956d360034062bf826860016bad2a1d7ea0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for nornir_scrapli 1.6.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page