{"id":23885604,"url":"https://github.com/ncclient/ncclient","last_synced_at":"2025-05-13T15:11:32.864Z","repository":{"id":1467592,"uuid":"1706198","full_name":"ncclient/ncclient","owner":"ncclient","description":"Python library for NETCONF clients","archived":false,"fork":false,"pushed_at":"2025-03-22T12:01:31.000Z","size":3492,"stargazers_count":693,"open_issues_count":72,"forks_count":404,"subscribers_count":61,"default_branch":"master","last_synced_at":"2025-04-23T18:56:53.703Z","etag":null,"topics":["ncclient","netconf","official-python-netconf","python","python-library"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ncclient.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-05-05T13:02:44.000Z","updated_at":"2025-04-05T19:03:00.000Z","dependencies_parsed_at":"2023-07-05T19:01:53.965Z","dependency_job_id":"de407a6a-4fbe-4b35-b2ec-cd7e8ba2660b","html_url":"https://github.com/ncclient/ncclient","commit_stats":{"total_commits":742,"total_committers":128,"mean_commits":5.796875,"dds":0.7264150943396226,"last_synced_commit":"65286b57e3aec848423914cf703ad9af5ae8e24d"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncclient%2Fncclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncclient%2Fncclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncclient%2Fncclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncclient%2Fncclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ncclient","download_url":"https://codeload.github.com/ncclient/ncclient/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253969260,"owners_count":21992263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ncclient","netconf","official-python-netconf","python","python-library"],"created_at":"2025-01-04T05:45:17.658Z","updated_at":"2025-05-13T15:11:27.847Z","avatar_url":"https://github.com/ncclient.png","language":"Python","readme":"![Build Status](https://github.com/ncclient/ncclient/actions/workflows/check.yaml/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/ncclient/ncclient/badge.svg?branch=master)](https://coveralls.io/github/ncclient/ncclient?branch=master)\n[![Documentation Status](https://readthedocs.org/projects/ncclient/badge/?version=latest)](https://readthedocs.org/projects/ncclient/?badge=latest)\n\n\n# ncclient: Python library for NETCONF clients\n\nncclient is a Python library that facilitates client-side scripting\nand application development around the NETCONF protocol. `ncclient` was\ndeveloped by [Shikar Bhushan](http://schmizz.net). It is now maintained\nby [Leonidas Poulopoulos (@leopoul)](http://ncclient.org) and Einar Nilsen-Nygaard (@einarnn)\n\n**Docs**: [http://ncclient.readthedocs.org](http://ncclient.readthedocs.org)\n\n**PyPI**: [https://pypi.python.org/pypi/ncclient](https://pypi.python.org/pypi/ncclient)\n\n\n## Recent Highlights\n\n|  Date  | Release | Description |\n| :----: | :-----: | :---------- |\n| 10/18/23 | `0.6.15` | See [release page](https://github.com/ncclient/ncclient/releases/tag/v0.6.15)|\n| 04/10/22 | `0.6.13` | See [release page](https://github.com/ncclient/ncclient/releases/tag/v0.6.13)|\n| 05/29/21 | `0.6.12` | See [release page](https://github.com/ncclient/ncclient/releases/tag/v0.6.12)|\n| 05/27/21 | `0.6.11` | See [release page](https://github.com/ncclient/ncclient/releases/tag/v0.6.11)|\n| 02/18/21 | `0.6.10` | See [release page](https://github.com/ncclient/ncclient/releases/tag/v0.6.10)|\n| 08/08/20 | `0.6.9` | See [release page](https://github.com/ncclient/ncclient/releases/tag/v0.6.9) |\n| 08/01/20 | `0.6.8` | Pulled due to accidental breaking API change |\n| 12/21/19 | `0.6.7` | See [release page](https://github.com/ncclient/ncclient/releases/tag/v0.6.7) |\n| 05/27/19 | `0.6.6` | See [release page](https://github.com/ncclient/ncclient/releases/tag/v0.6.6) |\n| 05/27/19 | `0.6.5` | Pulled due to bug in PyPi upload |\n| 04/07/19 | `0.6.4` | See [release page](https://github.com/ncclient/ncclient/releases/tag/v0.6.4) |\n| 09/26/18 | `0.6.3` | See [release page](https://github.com/ncclient/ncclient/releases/tag/v0.6.3) |\n| 08/20/18 | `0.6.2` | See [release page](https://github.com/ncclient/ncclient/releases/tag/v0.6.2) |\n| 07/02/18 | `0.6.0` | Minor release reinstating Python 3.7 and greater compatibility, but necessitating a change to client code that uses `async_mode`. |\n| 07/02/18 | `0.5.4` | New release rolling up myriad of small commits since `0.5.3`. Please note that this release is **incompatible wth Python 3.7** due to the use of a new Python 3.7 keyword, `async`, in function signatures. This will be resolved in 0.6.0|\n\n## Requirements\n\n* Python 2.7 or Python 3.5+\n* setuptools 0.6+\n* Paramiko 1.7+\n* lxml 3.3.0+\n* libxml2\n* libxslt\n\nIf you are on Debian/Ubuntu install the following libs (via aptitude or apt-get):\n* libxml2-dev\n* libxslt1-dev\n\n## Installation\n\n    [ncclient] $ sudo python setup.py install\n\nor via pip:\n\n    pip install ncclient\n\nAlso locally via pip from within local clone:\n\n    pip install -U .\n\n## Examples\n\n    [ncclient] $ python examples/juniper/*.py\n\n## Usage\n\n### Get device running config\nUse either an interactive Python console (ipython)\nor integrate the following in your code:\n\n    from ncclient import manager\n\n    with manager.connect(host=host, port=830, username=user, hostkey_verify=False) as m:\n        c = m.get_config(source='running').data_xml\n        with open(\"%s.xml\" % host, 'w') as f:\n            f.write(c)\n\nAs of 0.4.1 ncclient integrates Juniper's and Cisco's forks, lots of new concepts\nhave been introduced that ease management of Juniper and Cisco devices respectively.\nThe biggest change is the introduction of device handlers in connection paramms.\nFor example to invoke Juniper's functions annd params one has to re-write the above with `device_params={'name':'junos'}`:\n\n    from ncclient import manager\n\n    with manager.connect(host=host, port=830,\n                         username=user, hostkey_verify=False,\n                         device_params={'name':'junos'}) as m:\n        c = m.get_config(source='running').data_xml\n        with open(\"%s.xml\" % host, 'w') as f:\n            f.write(c)\n\nDevice handlers are easy to implement and prove to be futureproof.\n\n### Supported device handlers\n\nWhen instantiating a connection to a known type of NETCONF server:\n\n* Alcatel Lucent: `device_params={'name':'alu'}`\n* Ciena: `device_params={'name':'ciena'}`\n* Cisco:\n    - CSR: `device_params={'name':'csr'}`\n    - Nexus: `device_params={'name':'nexus'}`\n    - IOS XR: `device_params={'name':'iosxr'}`\n    - IOS XE: `device_params={'name':'iosxe'}`\n* H3C: `device_params={'name':'h3c'}`\n* HP Comware: `device_params={'name':'hpcomware'}`\n* Huawei:\n    - `device_params={'name':'huawei'}`\n    - `device_params={'name':'huaweiyang'}`\n* Juniper: `device_params={'name':'junos'}`\n* Server or anything not in above: `device_params={'name':'default'}`\n\n\n## For Developers\n\n### Running Unit Tests Locally\n\nTo run the same tests locally as are run via GitHub's CI/CD integration with Travis, the following istructions can be followed:\n\n1. Create a virtual environment, in this case using `virtualenvwrapper`:\n\n    ```\n    mkvirtualenv ncclient-testing\n    ```\n\n1. Install your local `ncclient` package (ensuring you are in your virtual environment):\n\n    ```\n    pip install -U .\n    ```\n\n1. Install testing dependencies:\n\n    ```\n    pip install pytest coverage coveralls mock\n    ```\n\n1. Finally, run the tests:\n\n    ```\n    pytest test --verbosity=3\n    ```\n\n    For coverage, showing missing lines do:\n    ```\n    coverage run -m pytest test --verbosity=3 \u0026\u0026 coverage report -m\n    ```\n\n### Making a Release\n\nAs of `0.6.1`, `versioneer` has been integrated into the `ncclient` codebase. This simplifies the creation of a new release, by ensuring that version numbers are automatically generated from the git tag used for the release, which **must** be in the form `v0.1.2`. Versioneer also allows for the clean install of development versions locally using pip. For example:\n\n```\n$ pip install -U .\nProcessing /opt/git-repos/versioneer-ncclient\n\n[...intermediate ouput elided...]\n\nBuilding wheels for collected packages: ncclient\n  Running setup.py bdist_wheel for ncclient ... done\n  Stored in directory: /Users/einarnn/Library/Caches/pip/wheels/fb/48/a8/5c781ebcfff7f091e18950e125c0ff638a5a2dc006610aa1e5\nSuccessfully built ncclient\nInstalling collected packages: ncclient\n  Found existing installation: ncclient 0.6.1\n    Uninstalling ncclient-0.6.1:\n      Successfully uninstalled ncclient-0.6.1\nSuccessfully installed ncclient-0.6.0+23.g0d9ccd6.dirty\n```\n\nThus, making a release becomes a simple process:\n\n1. Ensure all tests run clean (ideally both locally and via Travis) and that `README.md` (yes, this file!!) has been updated appropriately.\n2. Apply appropriate version tag, e.g. `git tag v0.6.1`\n3. After ensuring `build` is installed, build packages:\n\n    ```\n    python -m build\n    ```\n\n4. After ensuring twine is installed, test twine upload:\n\n    ```\n    twine upload \\\n        --repository-url https://test.pypi.org/legacy/ \\\n        -u ******* -p ******* \\\n        dist/*\n    ````\n\n5. Push git tags back to origin, `git push --tags`\n6. Do real twine upload:\n\n    ```\n    twine upload \\\n        -u ******* -p ******* \\\n        dist/*\n    ```\n\n## Contributors\n\n* v0.6.12: @einarnn\n* v0.6.11: @musicinmybrain, @sstancu, @earies\n* v0.6.10: @vnitinv, @omaxx, @einarnn, @musicinmybrain, @tonynii, @sstancu, Martin Volf, @fredgan, @avisom, Viktor Velichkin, @ogenstad, @earies\n* v0.6.8: [Fred Gan](https://github.com/fredgan), @vnitinv, @kbijakowski, @iwanb, @badguy99, @liuyong, Andrew Mallory, William Lvory\n* v0.6.7: @vnitinv, @chaitu-tk, @sidhujasminder, @crutcha, @markgoddard, @ganeshrn, @songxl, @doesitblend, @psikala, @xuxiaowei0512, @muffizone\n* v0.6.6: @sstancu, @hemna, @ishayansheikh\n* v0.6.4: @davidhankins, @mzagozen, @knobix, @markafarrell, @psikala, @moepman, @apt-itude, @yuekyang\n* v0.6.3: @rdkls, @Anthony25, @rsmekala, @vnitinv, @siming85\n* v0.6.2: @einarnn, @glennmatthews, @bryan-stripe, @nickylba\n* v0.6.0: @einarnn\n* v0.5.4: @adamcubel, Joel Teichroeb, @leopoul, Chase Garner, @budhadityabanerjee, @earies, @ganeshrn, @vnitinv, Siming Yuan, @mirceaaulinic, @stacywsmith, Xavier Hardy, @jwwilcox, @QijunPan, @avangel, @marekgr, @hugovk, @felixonmars, @dexteradeus\n* v0.5.3: [Justin Wilcox](https://github.com/jwwilcox), [Stacy W. Smith](https://github.com/stacywsmith), [Mircea Ulinic](https://github.com/mirceaulinic), [Ebben Aries](https://github.com/earies), [Einar Nilsen-Nygaard](https://github.com/einarnn), [QijunPan](https://github.com/QijunPan)\n* v0.5.2: [Nitin Kumar](https://github.com/vnitinv), [Kristian Larsson](https://github.com/plajjan), [palashgupta](https://github.com/palashgupta), [Jonathan Provost](https://github.com/JoProvost), [Jainpriyal](https://github.com/Jainpriyal), [sharang](https://github.com/sharang), [pseguel](https://github.com/pseguel), [nnakamot](https://github.com/nnakamot), [Алексей Пастухов](https://github.com/p-alik), [Christian Giese](https://github.com/GIC-de), [Peipei Guo](https://github.com/peipeiguo), [Time Warner Cable Openstack Team](https://github.com/twc-openstack)\n* v0.4.7: [Einar Nilsen-Nygaard](https://github.com/einarnn), [Vaibhav Bajpai](https://github.com/vbajpai), Norio Nakamoto\n* v0.4.6: [Nitin Kumar](https://github.com/vnitinv), [Carl Moberg](https://github.com/cmoberg), [Stavros Kroustouris](https://github.com/kroustou)\n* v0.4.5: [Sebastian Wiesinger](https://github.com/sebastianw), [Vincent Bernat](https://github.com/vincentbernat), [Matthew Stone](https://github.com/bigmstone), [Nitin Kumar](https://github.com/vnitinv)\n* v0.4.3: [Jeremy Schulman](https://github.com/jeremyschulman), [Ray Solomon](https://github.com/rsolomo), [Rick Sherman](https://github.com/shermdog), [subhak186](https://github.com/subhak186)\n* v0.4.2: [katharh](https://github.com/katharh), [Francis Luong (Franco)](https://github.com/francisluong), [Vincent Bernat](https://github.com/vincentbernat), [Juergen Brendel](https://github.com/juergenbrendel), [Quentin Loos](https://github.com/Kent1), [Ray Solomon](https://github.com/rsolomo), [Sebastian Wiesinger](https://github.com/sebastianw), [Ebben Aries](https://github.com/earies)\n* v0.4.1: [Jeremy Schulman](https://github.com/jeremyschulman), [Ebben Aries](https://github.com/earies), Juergen Brendel\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncclient%2Fncclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fncclient%2Fncclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncclient%2Fncclient/lists"}