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.15.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.15-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: alnp-2.0.15.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.15.tar.gz
Algorithm Hash digest
SHA256 050abea5bc194f86575f25e228de514ee9911af5947851cc819af573b1c6d705
MD5 627d13335d2bc2875e065c7df65ffb94
BLAKE2b-256 1c59317a76e4897cf9b7bfe72c50df8de0e127480b34b97d0ed19dbd651aa34f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: alnp-2.0.15-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.15-py3-none-any.whl
Algorithm Hash digest
SHA256 a5ff38ff4d9874235a7dfee5048f28eccf976597ca38a2a4b1ee95f2ee8a43e5
MD5 8af2177ad2c5a29c8a52fda6e2e92fc6
BLAKE2b-256 6ece6fa860723f3c17a51f0587558067c01bf3dbac25b14430f5cf8001c60855

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