scrapli / scrapli_netconf

Fast and flexible Python 3.7+ netconf client specifically for network devices
https://scrapli.github.io/scrapli_netconf/
MIT License
93 stars 6 forks source link

Supported Versions PyPI version Weekly Build Code Style License: MIT

scrapli_netconf


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

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

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


scrapli_netconf is a NETCONF driver built on top of scrapli, giving you all the scrapli behaviour you know and love, but for NETCONF connections.

Key Features:

Requirements

MacOS or *nix1, Python 3.7+

scrapli_netconf's only requirements are scrapli, of course, and lxml.

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

Installation

pip install scrapli_netconf

See the docs for other installation methods/details.

A Simple Example

from scrapli_netconf.driver import NetconfDriver

my_device = {
    "host": "172.18.0.13",
    "auth_username": "scrapli",
    "auth_password": "scrapli",
    "auth_strict_key": False,
    "port": 830
}

conn = NetconfDriver(**my_device)
conn.open()
response = conn.get_config(source="running")
print(response.result)