Skip to main content

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


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.14.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alnp-2.0.14-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file alnp-2.0.14.tar.gz.

File metadata

  • Download URL: alnp-2.0.14.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

Hashes for alnp-2.0.14.tar.gz
Algorithm Hash digest
SHA256 5caf63bcfbcd8e7a1ac594fd74da1c8c133e6b2fbb7237f7e8cb5d5d829b3c16
MD5 a74c4f4a8e4a2b1c90385b2bdf5ceae3
BLAKE2b-256 7168b38f25065e167c0b76e4f9825fb6b466c516f4f31e1bdd5b1d5ca71fd6ab

See more details on using hashes here.

File details

Details for the file alnp-2.0.14-py3-none-any.whl.

File metadata

  • Download URL: alnp-2.0.14-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

Hashes for alnp-2.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 d55ea3df1a7a8f91881979db8a4bb06c26b9135978f8505a12cc7f8eb574568c
MD5 a982b4fcaf47abdf349502f5717edace
BLAKE2b-256 70a41bde59fb1d0922c8bde0779866d1d8f760360f3c04a37eee0d46aec66c9f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page