Skip to main content

Python

Install the generated package (paths are relative to the onewili output root):

pip install -e ./python

Connect and send a first command:

import onewili

dev = onewili.connect() # discovers the device with pyfwfinder

# dev.gui.set_led_color(ledindex: int, red: int, green: int, blue: int, duration: int, mode: enums.owLEDManagerLEDMode | int) -> Result
res = dev.gui.set_led_color(...)
match res:
case onewili.Ok(value):
print(value)
case onewili.Err(message):
print("failed:", message)

dev.close()

Full command list: GUI Functions - or start at the API index.