A Python client library and CLI for controlling SignalRGB Pro
Project description
🌈 signalrgb-python
A Python client library and CLI for controlling SignalRGB Pro
Features • Installation • Usage • API Reference • Development • Contributing • License
🌟 Features
- List available lighting effects, presets, and layouts
- Apply effects, presets, and layouts to your devices
- Control canvas brightness and enabled state
- Synchronous client for scripts and tools
- Asynchronous client (httpx) for asyncio apps and Home Assistant integrations
- Rich-powered CLI with intuitive subcommands (
effect,preset,layout,canvas) - Effect caching and robust exception types for connection, API, and not-found errors
💎 Installation
# with uv (recommended)
uv add signalrgb
# or with pip
pip install signalrgb
Prerequisites
- Python 3.13+
- SignalRGB Pro — required for API access
This library uses the SignalRGB REST API, which is only available in SignalRGB Pro.
🎯 Usage
Command-line interface
The CLI is a Rich + Typer app with category subcommands for effects, presets, layouts, and canvas control.
# Effects
signalrgb effect list
signalrgb effect "Psychedelic Dream"
signalrgb effect apply "Rave Visualizer"
signalrgb effect random
signalrgb effect search "ocean"
# Presets
signalrgb preset list
signalrgb preset apply "My Fancy Preset"
# Layouts
signalrgb layout list
signalrgb layout set "My Gaming Layout"
# Canvas
signalrgb canvas # show state + brightness
signalrgb canvas brightness 75 # set brightness
signalrgb canvas brightness # read brightness
signalrgb canvas enable
signalrgb canvas disable
signalrgb canvas toggle
Point at a remote SignalRGB instance:
signalrgb --host hyperia.home --port 16038 effect list
Full help:
signalrgb --help
Synchronous client
from signalrgb import SignalRGBClient
client = SignalRGBClient(host="hyperia.home", port=16038)
# List effects
for effect in client.get_effects():
print(effect.attributes.name)
# Apply an effect and a preset
client.apply_effect_by_name("Rain")
current = client.get_current_effect()
client.apply_effect_preset(current.id, "Cool Preset")
# Canvas control
client.brightness = 50
client.enabled = True
Asynchronous client
For async apps and Home Assistant integrations, use AsyncSignalRGBClient as an async context
manager:
import asyncio
from signalrgb import AsyncSignalRGBClient
async def main() -> None:
async with AsyncSignalRGBClient(host="hyperia.home", port=16038) as client:
for effect in await client.get_effects():
print(effect.attributes.name)
await client.apply_effect_by_name("Rain")
await client.set_brightness(75)
await client.set_enabled(True)
current = await client.get_current_effect()
print(f"Current effect: {current.attributes.name}")
asyncio.run(main())
See the Async Client reference for the full async guide.
Error handling
from signalrgb import SignalRGBClient, ConnectionError, APIError, NotFoundError
client = SignalRGBClient()
try:
client.apply_effect_by_name("Non-existent Effect")
except ConnectionError as e:
print(f"Connection failed: {e}")
except NotFoundError as e:
print(f"Effect not found: {e}")
except APIError as e:
print(f"API error: {e}")
The same pattern works with the async client.
🔮 API Reference
Full API docs are published at https://hyperb1iss.github.io/signalrgb-python/.
🧪 Development
The project uses the Astral stack: uv for packaging, ruff for lint + format, ty for type
checking, and pytest for tests. All common tasks are wired up in the justfile.
# Clone and set up
git clone https://github.com/hyperb1iss/signalrgb-python.git
cd signalrgb-python
# Install everything (runtime + dev + docs)
just install
# Run the full check suite (lint, format, typecheck, tests)
just verify
# Or the fast loop (auto-fix then test)
just check
# Other common tasks
just test # pytest with coverage
just lint-fix # ruff check --fix
just fmt # ruff format
just typecheck # ty check
just docs-serve # mkdocs on :8000
just run effect list # run the CLI
just --list # see everything
See the Development Guide for the full workflow.
🦋 Contributing
Contributions are welcome. Fork, branch, and open a PR:
- Fork the repository
- Create a branch:
git checkout -b my-feature just verifyshould pass before you push- Open a pull request
Please include tests for new functionality and follow the existing code style (ruff + ty will tell you if anything's off).
📄 License
Apache License 2.0 — see LICENSE.
💜 Acknowledgements
This project is not officially associated with SignalRGB. It is an independent community client — please do not report client issues to the SignalRGB team.
Created by Stefanie Jane
If you find this project useful, consider buying me a Monster Ultra Violet.
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 signalrgb-1.0.2.tar.gz.
File metadata
- Download URL: signalrgb-1.0.2.tar.gz
- Upload date:
- Size: 39.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6400978c89a189e161258ff4c194a586ed78e6dcbc46768b25f846202345a3d
|
|
| MD5 |
f86f978d672877bf1935bd22774610de
|
|
| BLAKE2b-256 |
a7950bbbf7e851823d1381bf5738aea78b3c79544557624bdb4a687fd436002b
|
Provenance
The following attestation bundles were made for signalrgb-1.0.2.tar.gz:
Publisher:
publish.yml on hyperb1iss/signalrgb-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
signalrgb-1.0.2.tar.gz -
Subject digest:
c6400978c89a189e161258ff4c194a586ed78e6dcbc46768b25f846202345a3d - Sigstore transparency entry: 1238712965
- Sigstore integration time:
-
Permalink:
hyperb1iss/signalrgb-python@99121ef32345b089c4354a255bbbdfc1e3c4887a -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/hyperb1iss
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@99121ef32345b089c4354a255bbbdfc1e3c4887a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file signalrgb-1.0.2-py3-none-any.whl.
File metadata
- Download URL: signalrgb-1.0.2-py3-none-any.whl
- Upload date:
- Size: 25.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb749aa7771f27e7eb1734aaf09558657ae882bcba362fa8c1705ba1ddb4abf1
|
|
| MD5 |
ef3e9525978ef6f4e7955f2f8294b59e
|
|
| BLAKE2b-256 |
e174fa818cbf37466a654204185b7b1d289793762e4e26aec4288da8db54c134
|
Provenance
The following attestation bundles were made for signalrgb-1.0.2-py3-none-any.whl:
Publisher:
publish.yml on hyperb1iss/signalrgb-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
signalrgb-1.0.2-py3-none-any.whl -
Subject digest:
bb749aa7771f27e7eb1734aaf09558657ae882bcba362fa8c1705ba1ddb4abf1 - Sigstore transparency entry: 1238712972
- Sigstore integration time:
-
Permalink:
hyperb1iss/signalrgb-python@99121ef32345b089c4354a255bbbdfc1e3c4887a -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/hyperb1iss
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@99121ef32345b089c4354a255bbbdfc1e3c4887a -
Trigger Event:
workflow_dispatch
-
Statement type: