Fast, flexible, sync/async, Python 3.7+ screen scraping client specifically for network devices
Project description
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!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file scrapli-2024.7.30.post1.tar.gz
.
File metadata
- Download URL: scrapli-2024.7.30.post1.tar.gz
- Upload date:
- Size: 104.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a7b862ff66c1fabba5f0c5673cc5c46a46e24e0ebf19c37a56c398cbc3ccfde |
|
MD5 | aa81d5ce3e78f24410efdf5eab231de4 |
|
BLAKE2b-256 | 851b27dd7f93b72e49222fc26bde23f720c24e3779bc6946b46d7977150b67a2 |
File details
Details for the file scrapli-2024.7.30.post1-py3-none-any.whl
.
File metadata
- Download URL: scrapli-2024.7.30.post1-py3-none-any.whl
- Upload date:
- Size: 145.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59b96836f38d27498b141f6153ae0e169a5c806480f5e1f24cbb37ea74021e6f |
|
MD5 | f6150a59b2599923cb640b6646f97a6c |
|
BLAKE2b-256 | 0e4daf60aaf236f738dae6bf7daec613b9efa241a56d0822afde25f0e1463a5a |