4 ``ncclient`` is a Python library for NETCONF clients. It aims to offer an intuitive API that
5 sensibly maps the XML-encoded nature of NETCONF to Python constructs and idioms, and make writing
6 network-management scripts easier. Other key features are:
8 * Supports all operations and capabilities defined in :rfc:`4741`.
10 * Asynchronous RPC requests.
11 * Keeping XML out of the way unless really needed.
12 * Extensible. New transport mappings and capabilities/operations can be easily added.
14 It is suitable for Python 2.6+ (not Python 3 yet, though), and depends on `paramiko
15 <http://www.lag.net/paramiko/>`_, an SSH library.
17 The best way to introduce is of course, through a simple code example::
19 from ncclient import manager
21 # use unencrypted keys from ssh-agent or ~/.ssh keys, and rely on known_hosts
22 with manager.connect_ssh("host", username="user") as m:
23 assert(":url" in m.server_capabilities)
24 with m.locked("running"):
25 m.copy_config(source="running", target="file:///new_checkpoint.conf")
26 m.copy_config(source="file:///old_checkpoint.conf", target="running")