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

Uploaded Source

Built Distribution

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

alnp-1.2.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: alnp-1.2.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for alnp-1.2.2.tar.gz
Algorithm Hash digest
SHA256 a60a1e0b13113413df07d56c435e142fcea82d436663658e0bf5a676382b0897
MD5 e54f53648b148d265803bbcbc3d1427a
BLAKE2b-256 27ada3f471254591899efae98916bef74135cae7732461676cfe340c1813356a

See more details on using hashes here.

Provenance

The following attestation bundles were made for alnp-1.2.2.tar.gz:

Publisher: python-release.yml on alpine-core/Authenticated-Lighting-Protocol

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: alnp-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for alnp-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 858a152cd51a5058a0d5341f2bd1996405835a687abb7d76aaedca77003c760f
MD5 b65de71ea2901939f5c2ec1f71bf11e2
BLAKE2b-256 94a4a07c7b71fe008d2f0ea4adac4990e394ccb17ce39e051c3bcb811c8bbc77

See more details on using hashes here.

Provenance

The following attestation bundles were made for alnp-1.2.2-py3-none-any.whl:

Publisher: python-release.yml on alpine-core/Authenticated-Lighting-Protocol

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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