
[](https://badge.fury.io/py/netconf-client)
[](https://coveralls.io/github/ADTRAN/netconf_client?branch=main)
# netconf_client
A NETCONF client for Python 3.8+.
## 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(session, 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://adtran.github.io/netconf_client/
Raw data
{
"_id": null,
"home_page": "https://github.com/ADTRAN/netconf_client",
"name": "netconf-client",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "netconf",
"author": "ADTRAN, Inc.",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/78/5d/d66fc62c5913bccfe8ff556b27c5e1eeddac1949f5bec45fd763ed93a54e/netconf_client-3.1.2.tar.gz",
"platform": null,
"description": "\n[](https://badge.fury.io/py/netconf-client)\n[](https://coveralls.io/github/ADTRAN/netconf_client?branch=main)\n\n# netconf_client\n\nA NETCONF client for Python 3.8+.\n\n## Basic Usage\n\n```python\nfrom netconf_client.connect import connect_ssh\nfrom netconf_client.ncclient import Manager\n\nsession = connect_ssh(host=\"localhost\", port=830, username=\"admin\", password=\"password\")\nmgr = Manager(session, timeout=120)\n\nmgr.edit_config(config=\"\"\"<config> ... </config>\"\"\")\nprint(mgr.get(filter=\"\"\"<filter> ... </filter>\"\"\").data_xml)\n```\n\nMore complete documentation can be found in the [User Guide]\n\n## Comparison with `ncclient`\n\nCompared to [ncclient](https://github.com/ncclient/ncclient),\n`netconf_client` has several advantages:\n\n - It's simpler (at the time of writing: 789 LoC vs 2889 LoC)\n - lxml can be bypassed, which can work around issues where lxml\n breaks namespaces of e.g. identityrefs\n - Support for TLS sessions\n\nAnd a few disadvantages:\n\n - Support for non-RFC-compliant devices isn't really included in\n `netconf_client`\n - `netconf_client` does a lot less error checking and assumes you're\n sending valid messages to the server (however this can be useful\n for testing edge-case behavior of a server)\n\n\n[User Guide]: https://adtran.github.io/netconf_client/\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "A Python NETCONF client",
"version": "3.1.2",
"project_urls": {
"Documentation": "https://adtran.github.io/netconf_client/",
"Homepage": "https://github.com/ADTRAN/netconf_client",
"Repository": "https://github.com/ADTRAN/netconf_client"
},
"split_keywords": [
"netconf"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c7fac81bdf070af418214b6a34a09bf97be6c08fefecfd21c00d7cb173409c32",
"md5": "011ca9b7ee58746cf824d2f4df0ca425",
"sha256": "d8f34117a8ec96646ea6f4093319d24cdb1eb32199902a7fe569af95db747208"
},
"downloads": -1,
"filename": "netconf_client-3.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "011ca9b7ee58746cf824d2f4df0ca425",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 16228,
"upload_time": "2024-10-31T21:11:15",
"upload_time_iso_8601": "2024-10-31T21:11:15.755011Z",
"url": "https://files.pythonhosted.org/packages/c7/fa/c81bdf070af418214b6a34a09bf97be6c08fefecfd21c00d7cb173409c32/netconf_client-3.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "785dd66fc62c5913bccfe8ff556b27c5e1eeddac1949f5bec45fd763ed93a54e",
"md5": "f938a824b077848dc152d89c01022430",
"sha256": "687993607fb758f9367efcb923e5ce6c8a11991397a5dc7008de2471fdb5463d"
},
"downloads": -1,
"filename": "netconf_client-3.1.2.tar.gz",
"has_sig": false,
"md5_digest": "f938a824b077848dc152d89c01022430",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 14149,
"upload_time": "2024-10-31T21:11:17",
"upload_time_iso_8601": "2024-10-31T21:11:17.370319Z",
"url": "https://files.pythonhosted.org/packages/78/5d/d66fc62c5913bccfe8ff556b27c5e1eeddac1949f5bec45fd763ed93a54e/netconf_client-3.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-31 21:11:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ADTRAN",
"github_project": "netconf_client",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "netconf-client"
}