A Python NETCONF client
Project description
[![Build Status](https://travis-ci.org/ADTRAN/netconf_client.svg?branch=master)](https://travis-ci.org/ADTRAN/netconf_client)
[![PyPI version](https://badge.fury.io/py/netconf-client.svg)](https://badge.fury.io/py/netconf-client)
[![Documentation Status](https://readthedocs.org/projects/netconf-client/badge/?version=latest)](https://netconf-client.readthedocs.io/en/latest/?badge=latest)
# netconf_client
A NETCONF client for Python 2.7 and 3+.
## Basic Usage
```python
from netconf_client.connect import connect_ssh
from netconf_client.ncclient import Manager
session = connect_ssh(host="localhost", port=830, username="admin", password="password")
mgr = Manager(s, timeout=120)
mgr.edit_config(config="""<config> ... </config>""")
print(mgr.get(filter="""<filter> ... </filter>""").data_xml)
```
More complete documentation can be found in the [User Guide]
## Comparison with `ncclient`
Compared to [ncclient](https://github.com/ncclient/ncclient),
`netconf_client` has several advantages:
- It's simpler (at the time of writing: 789 LoC vs 2889 LoC)
- lxml can be bypassed, which can work around issues where lxml
breaks namespaces of e.g. identityrefs
- Support for TLS sessions
And a few disadvantages:
- Support for non-RFC-compliant devices isn't really included in
`netconf_client`
- `netconf_client` does a lot less error checking and assumes you're
sending valid messages to the server (however this can be useful
for testing edge-case behavior of a server)
[User Guide]: https://netconf-client.readthedocs.io/en/latest/
[![PyPI version](https://badge.fury.io/py/netconf-client.svg)](https://badge.fury.io/py/netconf-client)
[![Documentation Status](https://readthedocs.org/projects/netconf-client/badge/?version=latest)](https://netconf-client.readthedocs.io/en/latest/?badge=latest)
# netconf_client
A NETCONF client for Python 2.7 and 3+.
## Basic Usage
```python
from netconf_client.connect import connect_ssh
from netconf_client.ncclient import Manager
session = connect_ssh(host="localhost", port=830, username="admin", password="password")
mgr = Manager(s, timeout=120)
mgr.edit_config(config="""<config> ... </config>""")
print(mgr.get(filter="""<filter> ... </filter>""").data_xml)
```
More complete documentation can be found in the [User Guide]
## Comparison with `ncclient`
Compared to [ncclient](https://github.com/ncclient/ncclient),
`netconf_client` has several advantages:
- It's simpler (at the time of writing: 789 LoC vs 2889 LoC)
- lxml can be bypassed, which can work around issues where lxml
breaks namespaces of e.g. identityrefs
- Support for TLS sessions
And a few disadvantages:
- Support for non-RFC-compliant devices isn't really included in
`netconf_client`
- `netconf_client` does a lot less error checking and assumes you're
sending valid messages to the server (however this can be useful
for testing edge-case behavior of a server)
[User Guide]: https://netconf-client.readthedocs.io/en/latest/
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
netconf_client-1.5.1.tar.gz
(13.3 kB
view hashes)
Built Distribution
Close
Hashes for netconf_client-1.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea87c89e3ab4b74222e871dcabcf75d5f4a6301bd2cfd14be5cbd0002d3954f1 |
|
MD5 | 5e078a76db46db63dc701781915f41ad |
|
BLAKE2b-256 | 88f2ab15bfb8343ccc50295502cbe465c842fb433409bd3692317ea8b30db6d7 |