diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/keyboard.py b/keyboard.py new file mode 100644 index 0000000..771b48a --- /dev/null +++ b/keyboard.py @@ -0,0 +1,26 @@ +import openrazer.client +import json +import warnings +from pathlib import Path + +class keyboard: + + """Provides tooling to call openrazer.client.device""" + + def __init__(self): + self.kbd = None + self.find_keyboard() + if self.kbd is None: + warnings.warn('Compatible keyboard was not detected', RuntimeWarning) + + def find_keyboard(self): + if self.kbd is not None: + print('keyboard was already initiated') + return + + devman = openrazer.client.DeviceManager() + + for device in devman.devices: + if (device.name == "Razer BlackWidow Chroma V2"): + self.kbd = device + return \ No newline at end of file