Skip to main content

An asynchronous library to control Glimmr devices.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

glimmr-1.2.0-py3.8.egg (38.3 kB view details)

Uploaded Source

glimmr-1.2.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file glimmr-1.2.0-py3.8.egg.

File metadata

  • Download URL: glimmr-1.2.0-py3.8.egg
  • Upload date:
  • Size: 38.3 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for glimmr-1.2.0-py3.8.egg
Algorithm Hash digest
SHA256 79cc97a3668538f20b97c32c83c3d33b39f9716bdeba12e1aa6929a2139dd944
MD5 7be6074fa4c7b3b9c0fc1978f24a78a1
BLAKE2b-256 5933af58e16db0b4a0b73f337d34a6d099d538307b35c5e450a6c8a742a0c392

See more details on using hashes here.

File details

Details for the file glimmr-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: glimmr-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for glimmr-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59cc2dcf61281d6b0cb0ee57cf9a792840f714a8bc72fabff82fdf51f1f0e2ff
MD5 cdf10ef03393e45c204c23a72d484301
BLAKE2b-256 084efd660839d9a77e232e82c31be14b49f9db5dbe3a59c845d7f510f2c81901

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page