Metadata-Version: 2.3
Name: led-matrix-zmq
Version: 1.0.0
Summary: Library for interacting with led-matrix-zmq
Project-URL: source, https://github.com/Knifa/led-matrix-zmq-py
Author-email: Dan <knifa@users.noreply.github.com>
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.12
Requires-Dist: pyzmq>=26.2.0
Description-Content-Type: text/markdown

# led-matrix-zmq-py

![PyPI - Version](https://img.shields.io/pypi/v/led_matrix_zmq)

A Python library for interacting with [led-matrix-zmq-server](https://github.com/knifa/led-matrix-zmq-server).

## Installation

The package is called `led-matrix-zmq` and is available on [PyPI](https://pypi.org/project/led-matrix-zmq/) as is tradition.

## Usage

Check out the [examples](./examples) directory for some example code!

You'll probably want to use the `LmzMatrix` class which is a higher-level construct around the `LmzControl` and `LmzFrame` classes.

```python
from led_matrix_zmq import LmzMatrix

matrix = LmzMatrix(
    control_endpoint="ipc:///run/lmz-control.sock",
    frame_endpoint="ipc:///run/lmz-frame.sock",
)

print(f"Resolution: {matrix.config.width}x{matrix.config.height}")
print(f"Brightness: {matrix.brightness}")
print(f"Temperature: {matrix.temperature}")

matrix.brightness = 128
matrix.temperature = 2500

matrix.send_frame(
    b'\xFF' * (matrix.config.width * matrix.config.height * 4)
)
```
