Skip to main content

pybrilliantkiosk

Typed, fully async Python library for managing Brilliant smart panels that run the brilliant-ha-kiosk firmware add-on. It is the only code that talks to a panel; the Home Assistant integration builds on it.

  • asyncssh for SSH (password or private key, host-key pinning), no blocking I/O
  • aiohttp for GitHub releases; you inject the ClientSession
  • mypy --strict clean, ships py.typed
from pybrilliantkiosk import Panel, Releases

async with Panel("192.168.1.50", password="...", host_key=None) as panel:
    print(panel.host_key_fingerprint)  # pin this in the config flow
    snapshot = await panel.poll()  # health, settings, drift and setup status: ONE SSH command
    health = snapshot.health
    env = await panel.get_env()  # secrets masked
    await panel.set_env({"DAY_LEVEL": "12"}, restart=True)
    print(await panel.logs("ha-kiosk", 100))

client = Releases(session)
stable = await client.latest_stable()  # the release GitHub marks "Latest"
# Verify against a hash and size you keep yourself (streamed, capped at 50 MiB) ...
bundle, sha = await client.download(stable, sha256=PINNED_SHA256, size=PINNED_SIZE)
await panel.install(bundle, sha, size=PINNED_SIZE)
# ... or, weaker, against the release's own .sha256 asset: client.download(release)

set_env and reconcile_env hold the panel's setup lock, refuse (InvalidArgument, naming the keys, nothing written) when the running kiosk.env has a value that cannot be written safely instead of reverting it, and abort if kiosk.env changed on the panel since it was read (ConcurrentModification, retried once).

Errors: CannotConnect, AuthFailed, HostKeyMismatch, CommandFailed(exit_status, stderr), InvalidArgument, ChecksumMismatch, ConcurrentModification, ReleaseError; all derive from PanelError.

Development

python -m venv .venv && .venv/bin/pip install -e ".[dev]"
ruff check . && ruff format --check . && mypy --strict src && pytest  # 100 % coverage gate

Metadata

Release files for pybrilliantkiosk 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pybrilliantkiosk 0.1.0
File Size Uploaded Provenance Actions
pybrilliantkiosk-0.1.0.tar.gz 56.9 kB Without provenance Details for pybrilliantkiosk-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pybrilliantkiosk 0.1.0
File Interpreter ABI Platform Actions
pybrilliantkiosk-0.1.0-py3-none-any.whl Python 3 none any Details for pybrilliantkiosk-0.1.0-py3-none-any.whl

Total release size: 97.5 kB

Release files / pybrilliantkiosk-0.1.0.tar.gz

Download URL pybrilliantkiosk-0.1.0.tar.gz
Size 56.9 kB
Tags Source
SHA-256 checksum
How to use checksums
772180fd6c81f3583cdabc3f87711ab35eefa8ed5c8fde26e6018793b8907400
BLAKE2b-256 checksum
How to use checksums
ca22e579d45166648a626f0cf725823ed5f632065581097ae3681c14cd662c04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / pybrilliantkiosk-0.1.0-py3-none-any.whl

Download URL pybrilliantkiosk-0.1.0-py3-none-any.whl
Size 40.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8396e226d26cd204da3f6a7a3b365927b9250785f0265a9f5c36c8ee30c51040
BLAKE2b-256 checksum
How to use checksums
78e34f7955288b7d722114f1c046226ec09a0144ec421f20af75c5124ee7b50f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Security for pybrilliantkiosk 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page