Metadata-Version: 2.4
Name: wyrestorm-networkhd
Version: 3.1.2
Summary: Python client library for WyreStorm NetworkHD API operations - matrix switching, device control, video walls, and multiview.
Author-email: Matt-Hadley <81762940+Matt-Hadley@users.noreply.github.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/Matt-Hadley/wyrestorm-networkhd-py
Project-URL: Repository, https://github.com/Matt-Hadley/wyrestorm-networkhd-py.git
Project-URL: Issues, https://github.com/Matt-Hadley/wyrestorm-networkhd-py/issues
Project-URL: Documentation, https://matt-hadley.github.io/wyrestorm-networkhd-py/
Project-URL: Changelog, https://matt-hadley.github.io/wyrestorm-networkhd-py/changelog/
Keywords: wyrestorm,networkhd,api,matrix,switching,video,wall,multiview,hdmi,av,control
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Hardware
Classifier: Topic :: System :: Networking
Classifier: Topic :: Multimedia :: Video
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: paramiko>=3.0.0
Provides-Extra: dev
Requires-Dist: ruff>=0.17.0; extra == "dev"
Requires-Dist: pytest>=9.0.0; extra == "dev"
Requires-Dist: pytest-cov>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=1.4.0; extra == "dev"
Requires-Dist: pytest-mock>=3.17.0; extra == "dev"
Requires-Dist: bandit[toml]>=1.9.0; extra == "dev"
Requires-Dist: pip-audit>=2.6.0; extra == "dev"
Requires-Dist: mypy>=2.0.0; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: twine>=7.0.0; extra == "dev"
Requires-Dist: pre-commit>=3.6.0; extra == "dev"
Requires-Dist: vulture>=2.1.4; extra == "dev"
Requires-Dist: setuptools-scm>=10.0.0; extra == "dev"
Requires-Dist: wyrestorm-networkhd[rs232]; extra == "dev"
Provides-Extra: rs232
Requires-Dist: async-pyserial>=0.1.0; extra == "rs232"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.6.0; extra == "docs"
Requires-Dist: mkdocs-material>=9.5.0; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.26.0; extra == "docs"
Requires-Dist: mkdocs-include-markdown-plugin>=6.2.0; extra == "docs"
Requires-Dist: mkdocs-macros-plugin>=1.3.0; extra == "docs"
Dynamic: license-file

# WyreStorm NetworkHD Python Client

[![PyPI version](https://badge.fury.io/py/wyrestorm-networkhd.svg)](https://badge.fury.io/py/wyrestorm-networkhd)
[![Python Support](https://img.shields.io/pypi/pyversions/wyrestorm-networkhd.svg)](https://pypi.org/project/wyrestorm-networkhd/)
[![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/Matt-Hadley/8f4a6e65e2d520f63a82a34cddcc4b56/raw/coverage.json)](https://github.com/Matt-Hadley/wyrestorm-networkhd-py/actions)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

An async Python client for WyreStorm NetworkHD AV-over-IP systems. It talks to the NetworkHD controller over SSH or
RS232, wraps the NetworkHD API in typed methods and response models, and delivers real-time notifications to your
callbacks.

📖 **[Documentation](https://matt-hadley.github.io/wyrestorm-networkhd-py/)** | 🔄
**[Migrating from 2.x](https://matt-hadley.github.io/wyrestorm-networkhd-py/migration/)** | 💻
**[API Reference](https://matt-hadley.github.io/wyrestorm-networkhd-py/reference/core/)** | 🔧
**[Troubleshooting](https://matt-hadley.github.io/wyrestorm-networkhd-py/troubleshooting/)**

## Supported hardware

- **Controllers:** NHD-000-CTL and NHD-CTL-PRO, as covered by the
  [NetworkHD API v6.7](https://matt-hadley.github.io/wyrestorm-networkhd-py/resources/) document. The library talks to
  the controller only, never to endpoints directly.
- **Endpoints:** the 100, 200, 400, 500 and 600 series encoders and decoders that the API document covers. Some commands
  apply to certain series only; each method's docstring lists them.
- **Tested on:** NHD-000-CTL firmware v9.4.7 (API v1.28) with NHD-400 TX/RX firmware v2.5.6, over SSH.
- **Connection:** SSH (port 10022) or RS232. The controller ships with only Telnet enabled, which this library does not
  support: enable SSH in the controller's web interface first.

## Installation

```bash
pip install wyrestorm-networkhd

# With RS232 support
pip install "wyrestorm-networkhd[rs232]"
```

Requires Python 3.11 or later.

## Quick Start

```python
import asyncio

from wyrestorm_networkhd import NHDAPI, NetworkHDClientSSH


async def main():
    client = NetworkHDClientSSH(
        host="192.168.1.100",
        port=10022,
        username="wyrestorm",
        password="networkhd",
        ssh_host_key_policy="warn",
    )

    async with client:
        api = NHDAPI(client)

        print(await api.api_query.config_get_version())

        for device in await api.api_query.config_get_devicejsonstring():
            print(f"{device.aliasName} ({device.deviceType}): {'online' if device.online else 'offline'}")


asyncio.run(main())
```

This only reads from the controller. The [documentation](https://matt-hadley.github.io/wyrestorm-networkhd-py/) covers
switching, video walls, multiview, notifications, RS232 and SSH host keys: `"warn"` accepts any host key unless you pin
the controller's with `host_key_fingerprints` (get it with `ssh-keyscan -p 10022 <host> | ssh-keygen -lf -`).

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
