Python Glimmr API Client
An asynchronous Python client for Glimmr.
About
This package allows you to control and monitor a Glimmr device programmatically. It is mainly created to allow third-party programs to automate the behavior of Glimmr.
Installation
pip install glimmr
Usage
import asyncio
from glimmr import Glimmr
async def main():
"""Show example on controlling your GLIMMR device."""
async with Glimmr("glimmr-333.local") as led:
# Fetch data
await led.update()
print(led.system_data)
# Add callback for data from web socket
led.socket.on("olo", data_updated)
# Set device to video mode
await led.set_mode(1)
await asyncio.sleep(1000)
# Ambient color
await led.set_ambient_color("FF00FF")
await asyncio.sleep(1000)
# Ambient scene
await led.set_ambient_scene(4)
await asyncio.sleep(1000)
# Set device to "off"
await led.set_mode(0)
def data_updated(self, data):
print("Websocket callback: ", data)
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
Contributing
This is an active open-source project. We are always open to people who want to use the code or contribute to it.
Metadata
Release files for glimmr 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| glimmr-1.2.0-py3.8.egg | Legacy Egg format | - | - | Details |
| glimmr-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.9 kB
Release files / glimmr-1.2.0-py3.8.egg
| Download URL | glimmr-1.2.0-py3.8.egg |
|---|---|
| Size | 38.3 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
79cc97a3668538f20b97c32c83c3d33b39f9716bdeba12e1aa6929a2139dd944
|
|
BLAKE2b-256 checksum How to use checksums |
5933af58e16db0b4a0b73f337d34a6d099d538307b35c5e450a6c8a742a0c392
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
|
Release files / glimmr-1.2.0-py3-none-any.whl
| Download URL | glimmr-1.2.0-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
59cc2dcf61281d6b0cb0ee57cf9a792840f714a8bc72fabff82fdf51f1f0e2ff
|
|
BLAKE2b-256 checksum How to use checksums |
084efd660839d9a77e232e82c31be14b49f9db5dbe3a59c845d7f510f2c81901
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
|