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.
ssh2 transport plugin to take it to the next level!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"
pip install scrapli
See the docs for other installation methods/details.
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!
$ claude mcp add scrapli \
-- python -m otcore.mcp_server <graph>