Metadata-Version: 2.4
Name: alnp
Version: 2.0.18
Summary: Python helpers for the Authenticated Lighting Network Protocol.
Author: ALNP Maintainers
License: Apache-2.0
Project-URL: Homepage, https://github.com/alpine-core/Authenticated-Lighting-Protocol
Project-URL: Repository, https://github.com/alpine-core/Authenticated-Lighting-Protocol
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Topic :: System :: Networking
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# ALNP Python Package

Lightweight Python helpers for ALNP control envelopes and headers. This package is a thin layer for constructing/serializing control-plane messages; networking is left to the application.

## Usage
```python
from alnp import (
    build_discovery_request,
    build_control_envelope,
    build_frame_envelope,
    CapabilitySet,
    DeviceIdentity,
)

discovery = build_discovery_request(["identity", "capabilities"], b"\x00" * 32)
control = build_control_envelope(
    session_id="00000000-0000-0000-0000-000000000000",
    seq=1,
    op="set_mode",
    payload={"mode": "Normal"},
    mac=b"\x00" * 16,
)
frame = build_frame_envelope(
    session_id="00000000-0000-0000-0000-000000000000",
    timestamp_us=0,
    priority=5,
    channel_format="u8",
    channels=[0, 1, 2, 3],
)
print(discovery, control, frame)
```

## Build
```sh
python -m pip install -U build
python -m build
```
