Metadata-Version: 2.4
Name: ndm-client
Version: 2026.3.0a1
Summary: Python client and typed CLI covering every endpoint of the NX-DEVICE REST API server
Author: NATIXON
License-Expression: LicenseRef-Proprietary
Keywords: rest,nx-device,device-management,routing,bgp,isis,ldp,mpls,automation
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Developers
Classifier: Topic :: System :: Networking
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Dynamic: license-file

# NDM Client

Python client and command-line tool for the **NX-DEVICE REST API server**.
It covers every endpoint of REST API 3.20: users, workspaces, devices, port
configuration, generator/analyzer properties and resource bindings, port
protocol tools (ARP/IPv6, IGMP, MLD, DHCPv4/v6, LLDP), routing nodes with
their protocols and control-plane scenarios.

* **Zero dependencies** — pure standard library, Python 3.9 or newer.
* **Multi-server** — the server address is a parameter of every call, so one
  client can drive any number of servers.
* **Typed and documented** — typed wrappers, typed results and a clear
  exception hierarchy.

## Installation

```bash
pip install ndm-client
```

## Quick start

```python
from nx_device_client import NxClient

client = NxClient("alice", "s3cret")          # HTTP Basic credentials
SERVER = "http://tg-a.lab:8080"

for device in client.list_devices(SERVER):
    print(device)
```

Errors derive from `RpClientError`:

```python
from nx_device_client import RpClientError, RpNotFoundError

try:
    client.get_node_status(SERVER, "tg9", port="100Gx4_0_3")
except RpNotFoundError as error:
    print(error.status, error.message)
except RpClientError:
    raise
```

## Command line

Installing the package adds the `ndm-client` command:

```bash
ndm-client --help
ndm-client -i 192.0.2.10 -u alice -p s3cret device-list
ndm-client COMMAND --help      # parameters of one command
```

## TLS and timeouts

```python
client = NxClient("alice", "s3cret", timeout=60, verify_tls=False)
```

`timeout` is the socket timeout in seconds (default 30). `verify_tls=False`
accepts self-signed certificates.

## License

Free to use. Modification of your own copy for internal use is allowed;
redistribution, resale and distributing modified copies are not. See the
`LICENSE` file for the full terms.
