Deckr core contracts and runtime primitives for hardware, plugins, and controllers
Project description
deckr
deckr is the stable Python core for the Deckr ecosystem.
It holds the shared contracts and runtime primitives that other components can build on without pulling in controller-specific behavior. In practice that means:
- hardware event models and wire formats
- plugin manifests, events, and message types
- shared runtime utilities such as MQTT helpers and component lifecycle support
Python-specific invariant recipe helpers now live with the controller-side
runtime, not in deckr core.
The controller now lives in its own sibling repository:
https://github.com/kws/deckr-controller
Repository Layout
src/deckr/
core/ Generic runtime utilities and messaging primitives
hardware/ Hardware-facing shared contracts and wire models
hw/ Compatibility shim for older imports
plugin/ Plugin-facing contracts and manifests
tests/
Requirements
- Python 3.11+
uv
Quick Start
Install the project and development tooling:
uv sync
Run the default validation suite:
uv run ruff check .
uv run lint-imports
uv run pytest
Build distributables:
uv build
Package Boundaries
The core architectural rule is that deckr stays reusable and controller-free.
If code is specific to orchestration, rendering policy, device lifecycle
management, or controller configuration, it belongs in deckr-controller, not
here.
Internal boundaries are enforced with .importlinter:
deckr.coremust not importdeckr.hardwaredeckr.coremust not importdeckr.plugindeckr.hardwaremust not importdeckr.plugin
Run the contract checks with:
uv run lint-imports
Plugin Protocol Layers
The plugin contract is intentionally split into an Elgato-aligned core plus Deckr-specific extensions:
deckr.plugin.core_api- The minimum surface a controller-lite implementation should support.
- Keeps
set_title,set_image,set_state,show_alert,show_ok, settings,open_url, andswitch_to_profileclose to Stream Deck semantics.
deckr.plugin.extensions- Deckr-only features such as dynamic pages, screen power control, and graph image capability advertisement.
The key image rule is:
- core
set_image: Stream Deck-style image reference, typically a plugin-local path or a data URI / base64 image string - Deckr graph image extension: still uses
set_image, but the string can be a Deckr graph-image data URI with media typeapplication/vnd.deckr.graph+json
deckr.hw Rename
The shared hardware package has been renamed from deckr.hw to
deckr.hardware.
New code should import deckr.hardware. A lightweight compatibility shim is
kept in place for older deckr.hw imports while downstream packages migrate.
Releases
This repository now releases a single distribution: deckr.
- The source of truth for the published version is the root
pyproject.toml. - Use package tags in the form
deckr-vX.Y.Z. - Stable releases use normal PEP 440 versions such as
0.3.0. - After each stable release, bump immediately to the next development line,
e.g.
0.4.0.dev0, in a separate follow-up commit.
Release Flow
-
Update
versioninpyproject.tomlto the stable release number. -
Run the validation suite:
uv run ruff check . uv run lint-imports uv run pytest
-
Refresh the lockfile:
uv lock --refresh
-
Commit the release, for example:
git commit -am "chore(deckr): release v0.3.0"
-
Tag the release commit:
git tag deckr-v0.3.0
-
Build from the tag so the artifacts match the stable version exactly:
git checkout deckr-v0.3.0 uv build git checkout -
-
Publish the wheel and sdist using your usual PyPI workflow.
-
Immediately bump
pyproject.tomlto the next development version, refresh the lockfile, and commit that separately:uv lock --refresh git commit -am "chore(deckr): bump to development release 0.4.0.dev0"
The stable tag should always point at the stable release commit, not the later
.dev0 commit.
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
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
File details
Details for the file deckr-0.2.0.tar.gz.
File metadata
- Download URL: deckr-0.2.0.tar.gz
- Upload date:
- Size: 98.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4090a88d2c094849708b56c6bd818fe235864f0683f61158badf3bda31642be
|
|
| MD5 |
34543f6e4a7ae26856763bea3c2b047a
|
|
| BLAKE2b-256 |
dde3a86192c84e42e0868d7b2726364bcdcc82311a83b45185e67a110b3c4a08
|
File details
Details for the file deckr-0.2.0-py3-none-any.whl.
File metadata
- Download URL: deckr-0.2.0-py3-none-any.whl
- Upload date:
- Size: 34.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d5747cbe06a62515f1e0a08b45c5c8d828758d8356760eb103d3d32d949bdfc
|
|
| MD5 |
0e86be14f1aaa65e6f76a8bdddfb0c86
|
|
| BLAKE2b-256 |
bbc3cdd9bfd3e3925f658fc821bf709c7e89f6cae9d29ef05accceac6d4c2278
|