MCPcopy Index your code
hub / github.com/carlmontanari/scrapli

github.com/carlmontanari/scrapli @2026.02.20

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2026.02.20 ↗ · + Follow
1,144 symbols 4,594 edges 159 files 458 documented · 40% updated 7d agov2.0.0-rc.15 · 2026-06-15★ 6871 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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.7+ 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.
  • Sounds great, but I am a Gopher: For our Go loving friends out there, check out scrapligo for a similar experience, but in Go!

Requirements

MacOS or *nix1, Python 3.7+

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 While Python 3.6 has been dropped, it probably still works, but 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": "scrapli",
   "auth_password": "scrapli",
   "auth_strict_key": False,
   "platform": "cisco_iosxe"
}

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

* Bunny artwork by Caroline Montanari, inspired by @egonelbre. The bunny/rabbit is a nod to/inspired by the white rabbit in Monty Python and the Holy Grail, because there are enough snake logos already!

Core symbols most depended-on inside this repo

Shape

Function 704
Method 355
Class 80
Route 5

Languages

Python100%

Modules by API surface

tests/unit/conftest.py47 symbols
tests/unit/driver/base/test_base_base_driver.py38 symbols
tests/unit/driver/network/test_network_sync_driver.py26 symbols
tests/unit/driver/network/test_network_async_driver.py26 symbols
scrapli/driver/base/base_driver.py26 symbols
tests/unit/transport/plugins/telnet/test_telnet_transport.py23 symbols
tests/unit/test_ssh_config.py23 symbols
tests/unit/test_helper.py23 symbols
tests/unit/channel/test_sync_channel.py23 symbols
tests/unit/channel/test_async_channel.py23 symbols
tests/unit/driver/network/test_network_base_network_driver.py21 symbols
scrapli/channel/base_channel.py21 symbols

For agents

$ claude mcp add scrapli \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page