Skip to content

Synchronous Client

SignalRGBClient provides a blocking interface to the SignalRGB API. Internally it wraps AsyncSignalRGBClient behind a dedicated event loop.

Constructor

python
from signalrgb import SignalRGBClient

client = SignalRGBClient(
    host="localhost",  # API host
    port=16038,        # API port
    timeout=10.0,      # request timeout (seconds)
)

Context manager

python
with SignalRGBClient() as client:
    print(client.get_current_effect().attributes.name)
# resources cleaned up automatically

Effects

MethodReturnsDescription
get_effects()list[Effect]All available effects (cached)
get_effect(id)EffectEffect by ID
get_effect_by_name(name)EffectEffect by name
get_current_effect()EffectCurrently active effect
apply_effect(id)NoneApply effect by ID
apply_effect_by_name(name)NoneApply effect by name
apply_next_effect()EffectApply next in history
apply_previous_effect()EffectApply previous in history
apply_random_effect()EffectApply a random effect
refresh_effects()NoneClear the effects cache

Presets

MethodReturnsDescription
get_effect_presets(effect_id)list[EffectPreset]Presets for an effect
apply_effect_preset(effect_id, preset_id)NoneApply a preset

Layouts

MethodReturnsDescription
get_layouts()list[Layout]All available layouts

Properties

PropertyTypeDescription
current_layoutLayout (r/w)Get or set the current layout

Canvas

PropertyTypeDescription
brightnessint (r/w)Canvas brightness (0–100)
enabledbool (r/w)Canvas enabled state
current_effectEffect (read-only)Alias for get_current_effect()

Exceptions

All exceptions inherit from SignalRGBError:

ExceptionWhen
ConnectionErrorCan't reach the SignalRGB API
APIErrorAPI returns a non-OK status
NotFoundErrorEffect, preset, or layout not found

Released under the Apache 2.0 License.