/python-liboxide

Python wrapper around the oxide command line tools

Primary LanguagePythonMIT LicenseMIT

liboxide on PyPI

Python wrapper around the oxide command line tools

Installation

pip install liboxide

Usage

import liboxide

liboxide.wifi.enable()

print("Applications:")
for name, app in liboxide.apps.applications.items():
    print(f"  {name}: {app.bin}")

autoLock = liboxide.settings.get("autoLock")
print("Automatically locking after {autoLock} minutes")

print(f"Battery level: {liboxide.power.batteryLevel}")
while True:
    batteryLevel = liboxide.power.on.batteryLevelChanged()
    print(f"Battery level: {batteryLevel}")