skillfed

ncclient

Python library for NETCONF clients

ncclient v0.7.1 938.3K downloads/30d#4,687 on PyPI737
Permissive license Apache-2.0 Active released

What it is and what it does

ncclient provides a Python API for building NETCONF clients that communicate with network devices using the NETCONF protocol over SSH. It abstracts the complexity of NETCONF message framing, XML parsing, and RPC handling, allowing developers to retrieve device configuration, execute commands, and manage network state programmatically. The library includes device-specific handlers for major vendors including Juniper, Cisco, Huawei, Alcatel Lucent, Ciena, H3C, and HP Comware, which adapt NETCONF behavior to vendor-specific extensions and quirks.

The package depends on lxml for XML processing and paramiko for SSH transport. It supports Python 3.7 through 3.13 and is actively maintained. Common use cases include fetching running configuration from devices, executing RPC operations, subscribing to NETCONF notifications, and integrating device management into automation workflows. The library handles NETCONF 1.0 and 1.1 protocol versions and includes support for call-home and YANG 1.1 actions.

Use it for:

  • Retrieve and backup running configuration from network devices via NETCONF get-config operations.
  • Automate network device configuration changes by sending edit-config RPC operations programmatically.
  • Subscribe to device notifications and events via NETCONF subscriptions for real-time monitoring.
  • Build multi-vendor network management tools using device handlers to normalize vendor-specific behavior.
  • Integrate NETCONF operations into infrastructure-as-code or network automation pipelines.
  • Execute vendor-specific RPC operations through a unified Python interface.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

ncclient is a Python library that implements NETCONF client functionality, enabling programmatic configuration and monitoring of network devices via the NETCONF protocol.

Yes. ncclient is a mature, actively maintained library with no known vulnerabilities, permissive Apache-2.0 licensing, and low install friction. It is the standard Python NETCONF client for network automation and device management. Install it if you need to programmatically manage NETCONF-capable network devices; the only prerequisite is having libxml2 and libxslt system libraries available.

Install

ncclient on PyPI

pip

pip install ncclient

uv

uv add ncclient

poetry

poetry add ncclient

Installing ncclient

Before you install

Low install friction with a pure-Python wheel distribution. Active maintenance with a recent release and ongoing repository activity. Depends on lxml and paramiko, both stable and widely-used libraries.

License in practice

Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution.

Quickstart

pip install ncclient

from ncclient import manager

with manager.connect(host=host, port=830, username=user, hostkey_verify=False) as m:
    config = m.get_config(source='running').data_xml
    print(config)

Requires libxml2 and libxslt system libraries (libxml2-dev and libxslt1-dev on Debian/Ubuntu); SSH access to a NETCONF-enabled device on port 830.

Verify before relying

  • Production readiness and maturity level of device handler implementations across all supported vendors.
  • Performance characteristics and scalability limits for large-scale device management operations.
  • Current test coverage percentage and CI/CD pipeline status beyond the mention of increased test coverage in v0.6.10.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 2 — lxml, paramiko
Maintenance actively maintained — 152 days since the last release
Last repo commit
First released
Downloads 938,252/month — #4,687 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: ncclient-0.7.1-py3-none-any.whl

Keywords: Cisco NXOS Optimization, Juniper Optimization, NETCONF, NETCONF Python client

Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Networking

Tags

NETCONF client librarynetwork device configuration pythonNETCONF protocol implementationJuniper Cisco device managementSSH network automationXML-based device controlnetwork device scripting
network-automationnetconf-protocoldevice-management

More Python Modules packages