Skip to main content

Streamdeck controls

This project is a simple and small framework which simplifies developing and running custom apps for streamdeck devices. It allows using streamdecks without the official software so you can use it with any major OS.

Currently supported Streamdecks

  • Streamdeck Mk.2

Installing

Prerequisites

  • Python 3.12 or newer (development targets Python 3.15)

  • hidapi

Linux:

sudo apt install libhidapi-dev

macOS:

brew install hidapi

Installing sd-controls

pip install sd-controls

Development

python3.15 -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
python -m unittest discover -v
python -m ruff check .
python -m build

The virtual deck also requires Tkinter (often a separate OS package). The test suite uses fake devices and does not require connected hardware.

Contributing

If you are interested in this project and have a streamdeck, please consider contributing to it. Adding support for other Streamdecks is greatly appreciated but feel free to propose any other changes too!

Using this software with Linux (Linux udev rules)

Create a /etc/udev/rules.d/50-elgato.rules file with the following content:

SUBSYSTEM=="input", GROUP="input", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0080", MODE:="666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0080", MODE:="666", GROUP="plugdev"

Example app

from PIL import Image
from sd_controls.sdsystem import SDSystem, SDUserApp, Sprites


class HelloWorldApp(SDUserApp):
    _KEY_GREET = 1
    _KEY_ROTATE = 2

    def __init__(self) -> None:
        super().__init__("Settings")
        self._icon = SDUserApp.generate_labeled_img(Sprites.CLEAR, "Hello World")
        self._hello = SDUserApp.generate_labeled_img(Sprites.CLEAR, "Hello")
        self._world = SDUserApp.generate_labeled_img(Sprites.CLEAR, "World")
        self._rotate_key = Sprites.GOAT

    def get_icon(self) -> Image.Image:
        return self._icon

    def init(self) -> None:
        self.set_key(self._KEY_GREET, self._hello)
        self.set_key(self._KEY_ROTATE, self._rotate_key)

    def keys_update(self, keys_before: list[bool], keys: list[bool]) -> None:
        if not keys[self._KEY_GREET] and keys_before[self._KEY_GREET]:
            self.set_key(self._KEY_GREET, self._world)
        if not keys[self._KEY_ROTATE] and keys_before[self._KEY_ROTATE]:
            self._rotate_key = self._rotate_key.rotate(90)
            self.set_key(self._KEY_ROTATE, self._rotate_key)
            

system = SDSystem()
system.register_app(HelloWorldApp())
system.start()

Metadata

Release files for sd-controls 0.0.16

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

Source distribution (sdist)

Source distribution for sd-controls 0.0.16
File Size Uploaded Provenance Actions
sd_controls-0.0.16.tar.gz 119.5 kB Without provenance Details for sd_controls-0.0.16.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sd-controls 0.0.16
File Interpreter ABI Platform Actions
sd_controls-0.0.16-py3-none-any.whl Python 3 none any Details for sd_controls-0.0.16-py3-none-any.whl

Total release size: 235.7 kB

Release files / sd_controls-0.0.16.tar.gz

Download URL sd_controls-0.0.16.tar.gz
Size 119.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f2c986076cf7b695ca39d08bf5f7b3a93ef0ad3f6b068701243a31fd99ac6051
BLAKE2b-256 checksum
How to use checksums
9975f46654a29127f16508e8e74b575de1bdbbfe15f6b8ae2e507442a5dbbd6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Release files / sd_controls-0.0.16-py3-none-any.whl

Download URL sd_controls-0.0.16-py3-none-any.whl
Size 116.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32f097ab7531d9f5f621c84fdc9b4c850bd3da0772593a6d290641fe995a27cb
BLAKE2b-256 checksum
How to use checksums
bb61f5b50fc0cb909a715b7799200d6978b3ea158d2550edce4aeaba485d4f31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Security for sd-controls 0.0.16

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