Metadata-Version: 2.4
Name: wyrestorm-networkhd
Version: 2.2.0
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>
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: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Hardware
Classifier: Topic :: System :: Networking
Classifier: Topic :: Multimedia :: Video
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.12.10; extra == "dev"
Requires-Dist: pytest>=8.4.1; extra == "dev"
Requires-Dist: pytest-cov>=6.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=1.0.0; extra == "dev"
Requires-Dist: pytest-mock>=3.12.0; extra == "dev"
Requires-Dist: bandit[toml]>=1.7.0; extra == "dev"
Requires-Dist: pip-audit>=2.6.0; extra == "dev"
Requires-Dist: mypy>=1.8.0; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: twine>=6.1.0; extra == "dev"
Requires-Dist: pre-commit>=3.6.0; extra == "dev"
Requires-Dist: vulture>=2.1.4; extra == "dev"
Requires-Dist: pyupgrade>=3.10.0; extra == "dev"
Requires-Dist: setuptools-scm>=8.1.0; extra == "dev"
Requires-Dist: async-pyserial>=0.1.0; extra == "dev"
Requires-Dist: paramiko>=3.0.0; 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)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

A Python client library for WyreStorm NetworkHD devices, providing a high-level interface for device control and
monitoring. Features **strongly typed APIs**, **async/await support**, **multiple connection types** (SSH and RS232),
**comprehensive API coverage**, **robust error handling**, and **real-time notifications**.

📖 **[View Documentation](https://matt-hadley.github.io/wyrestorm-networkhd-py/)** | 🚀 **[Quick Start](#quick-start)**
| 💻 **[API Reference](https://matt-hadley.github.io/wyrestorm-networkhd-py/reference/core/)** | 🔧
**[Troubleshooting](https://matt-hadley.github.io/wyrestorm-networkhd-py/troubleshooting/)**

## Installation

```bash
pip install wyrestorm-networkhd

# For RS232 support (optional)
pip install wyrestorm-networkhd[rs232]
```

## Quick Start

```python
import asyncio
from wyrestorm_networkhd import NetworkHDClientSSH, NHDAPI

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

    # Register notification callbacks for real-time updates
    def on_device_status(notification):
        print(f"Device {notification.device} is {'online' if notification.online else 'offline'}")

    def on_cec_data(notification):
        print(f"CEC data from {notification.device}: {notification.cec_data}")

    client.register_notification_callback("endpoint", on_device_status)
    client.register_notification_callback("cecinfo", on_cec_data)

    # Use async context manager for automatic connection handling
    async with client:
        # Create API wrapper for organized command access
        api = NHDAPI(client)

        # Execute commands and get typed responses
        device_list = await api.api_query.config_get_devicelist()
        matrix_info = await api.api_query.matrix_get()

        # Query device information with typed responses
        devices = await api.api_query.config_get_device_info()
        for device in devices:
            print(f"Device {device.aliasname} ({device.name}) - IP: {device.ip4addr}")

        # Query device status with typed responses
        status_list = await api.api_query.config_get_device_status()
        for status in status_list:
            print(f"Device {status.aliasname} - HDMI out: {status.hdmi_out_active}")
        await api.video_wall.scene_active("office", "splitmode")

        # Real-time notifications are automatically handled in the background

# Run the async function
asyncio.run(main())
```

## 📚 Documentation

**🌐 [Complete Documentation](https://matt-hadley.github.io/wyrestorm-networkhd-py/)**

- **[Getting Started](https://matt-hadley.github.io/wyrestorm-networkhd-py/)**: Installation, configuration, and usage
  examples
- **[API Reference](https://matt-hadley.github.io/wyrestorm-networkhd-py/reference/core/)**: Complete API documentation
  with type hints
- **[Core Components](https://matt-hadley.github.io/wyrestorm-networkhd-py/reference/core/)**: Client classes and
  connection management
- **[Commands](https://matt-hadley.github.io/wyrestorm-networkhd-py/reference/commands/)**: All command modules and
  methods
- **[Models](https://matt-hadley.github.io/wyrestorm-networkhd-py/reference/models/)**: Data models and response
  structures
- **[Resources](https://matt-hadley.github.io/wyrestorm-networkhd-py/resources/)**: NetworkHD raw API documentation
- **[Troubleshooting](https://matt-hadley.github.io/wyrestorm-networkhd-py/troubleshooting/)**: Common issues and
  solutions

## License

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