Skip to main content

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

Project description

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())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scrapli-2021.7.30a2.tar.gz (81.7 kB view details)

Uploaded Source

Built Distribution

scrapli-2021.7.30a2-py3-none-any.whl (125.6 kB view details)

Uploaded Python 3

File details

Details for the file scrapli-2021.7.30a2.tar.gz.

File metadata

  • Download URL: scrapli-2021.7.30a2.tar.gz
  • Upload date:
  • Size: 81.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for scrapli-2021.7.30a2.tar.gz
Algorithm Hash digest
SHA256 f503929f68a9d378e3cc9a4c3c2b446b7743820a2e34ef5917fe365eb65fd70f
MD5 a3de9bd2b61f1ed258e16161cebc52f5
BLAKE2b-256 f1f09d730a5d7c413af8e1659babb1272a63d0b63346bcb21137fa6c8682e062

See more details on using hashes here.

File details

Details for the file scrapli-2021.7.30a2-py3-none-any.whl.

File metadata

  • Download URL: scrapli-2021.7.30a2-py3-none-any.whl
  • Upload date:
  • Size: 125.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for scrapli-2021.7.30a2-py3-none-any.whl
Algorithm Hash digest
SHA256 0f9803a4f1eb7d046d68dda7d165d1bb7d9cb14a2a5f6ab5f59169ec899a7922
MD5 11679d872871fe4b9fe2d57bbc8dff9f
BLAKE2b-256 66b27c20894272f3babf589847d7a5e51bd27831d2b18dd17072bd90c3991798

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page