Python helpers for the Authenticated Lighting Network Protocol.
Project description
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
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
python -m pip install -U build
python -m build
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
alnp-2.0.13.tar.gz
(3.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
alnp-2.0.13-py3-none-any.whl
(3.7 kB
view details)
File details
Details for the file alnp-2.0.13.tar.gz.
File metadata
- Download URL: alnp-2.0.13.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2c683cd12345541b61677258a958b41b3dbc0a4afa3301c98d7f87d0571b793
|
|
| MD5 |
c5ae1c3e31cc56b8614b3ef5f7c98ff2
|
|
| BLAKE2b-256 |
c8d680f65ae281637e61e731f72694032c45f02a276ff5070f6aafb50edd08e1
|
File details
Details for the file alnp-2.0.13-py3-none-any.whl.
File metadata
- Download URL: alnp-2.0.13-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a957c1d329baae383ea98093607e6856a2ba86d8d81d2effebab5c4850b277bf
|
|
| MD5 |
cd24589e0fdf35717f01e28a83137c9b
|
|
| BLAKE2b-256 |
45187422aec2e0a64b7eefe1c751ad89f23b3a56bb0c6e992a9fd1fd0b59b595
|