Need help with scrapli?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

carlmontanari
180 Stars 12 Forks MIT License 63 Commits 0 Opened issues

Description

Fast, flexible, sync/async, Python 3.6+ screen scraping client specifically for network devices

Services available

!
?

Need anything else?

Contributors list

# 311,427
Python
Shell
HTML
63 commits

Supported Versions PyPI version Weekly Build Coverage Code Style License: MIT

scrapli


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

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

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


scrapli -- scrap(e c)li -- is a python 3.6+ library focused on connecting to devices, specifically network devices (routers/switches/firewalls/etc.) via Telnet or SSH.

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!
  • Concurrency on Easy Mode: Nornir's scrapli plugin gives you all the normal benefits of scrapli plus all the great features of Nornir.

Requirements

MacOS or *nix1, Python 3.6+

scrapli "core" has no requirements other than the Python standard library2.

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

2 Python 3.6 requires the

dataclass
backport as well as third party
async_generator
library, Python 3. 7+ has no external dependencies for scrapli "core"

Installation

pip install scrapli

See the docs for other installation methods/details.

A simple Example

from scrapli import Scrapli

device = { "host": "172.18.0.11", "auth_username": "vrnetlab", "auth_password": "VR-netlab9", "auth_strict_key": False, "platform": "cisco_iosxe" }

conn = Scrapli(**device) conn.open() print(conn.get_prompt())

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.