Skip to main content

A Python client library and CLI for controlling SignalRGB Pro

Project description

🌈 signalrgb-python

CI License PyPI version Python

A Python client library and CLI for controlling SignalRGB Pro

FeaturesInstallationUsageAPI ReferenceDevelopmentContributingLicense

🌟 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

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:

  1. Fork the repository
  2. Create a branch: git checkout -b my-feature
  3. just verify should pass before you push
  4. 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


Download files

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

Source Distribution

signalrgb-1.0.2.tar.gz (39.2 kB view details)

Uploaded Source

Built Distribution

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

signalrgb-1.0.2-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

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

Hashes for signalrgb-1.0.2.tar.gz
Algorithm Hash digest
SHA256 c6400978c89a189e161258ff4c194a586ed78e6dcbc46768b25f846202345a3d
MD5 f86f978d672877bf1935bd22774610de
BLAKE2b-256 a7950bbbf7e851823d1381bf5738aea78b3c79544557624bdb4a687fd436002b

See more details on using hashes here.

Provenance

The following attestation bundles were made for signalrgb-1.0.2.tar.gz:

Publisher: publish.yml on hyperb1iss/signalrgb-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for signalrgb-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bb749aa7771f27e7eb1734aaf09558657ae882bcba362fa8c1705ba1ddb4abf1
MD5 ef3e9525978ef6f4e7955f2f8294b59e
BLAKE2b-256 e174fa818cbf37466a654204185b7b1d289793762e4e26aec4288da8db54c134

See more details on using hashes here.

Provenance

The following attestation bundles were made for signalrgb-1.0.2-py3-none-any.whl:

Publisher: publish.yml on hyperb1iss/signalrgb-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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