Skip to main content

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.core must not import deckr.hardware
  • deckr.core must not import deckr.plugin
  • deckr.hardware must not import deckr.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, and switch_to_profile close 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 type application/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

  1. Update version in pyproject.toml to the stable release number.

  2. Run the validation suite:

    uv run ruff check .
    uv run lint-imports
    uv run pytest
    
  3. Refresh the lockfile:

    uv lock --refresh
    
  4. Commit the release, for example:

    git commit -am "chore(deckr): release v0.3.0"
    
  5. Tag the release commit:

    git tag deckr-v0.3.0
    
  6. Build from the tag so the artifacts match the stable version exactly:

    git checkout deckr-v0.3.0
    uv build
    git checkout -
    
  7. Publish the wheel and sdist using your usual PyPI workflow.

  8. Immediately bump pyproject.toml to 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deckr-0.1.0.tar.gz (96.5 kB view details)

Uploaded Source

Built Distribution

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

deckr-0.1.0-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

Details for the file deckr-0.1.0.tar.gz.

File metadata

  • Download URL: deckr-0.1.0.tar.gz
  • Upload date:
  • Size: 96.5 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

Hashes for deckr-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c3e9ac5b3c4bef6c14e0b0187f34a40570d2ea138caaab5e56df05afacf59bbe
MD5 18f1e7faf263073ba1db3933a8dd38f9
BLAKE2b-256 8a7ec406783f4ee7a6432850a09f0fe3f7dc9fb4894136cb440c4509e0642ff8

See more details on using hashes here.

File details

Details for the file deckr-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: deckr-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 33.4 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

Hashes for deckr-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ce9293d3a3188d66c0b1c205c94c564f3c6818250f39d3284751886f41d5281
MD5 21934a06cfa85b091f360b05559b28d4
BLAKE2b-256 59f6c1da424990ef6e19663e07dbd4954eccdb78025bacad68a8221caaff7911

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