Skip to main content

Latest version released on PyPi Apache license version 2.0 Python Versions

blynclight is a Python package that provides python bindings for the Embrava BlyncLight family of products. These bindings have been tested on MacOS and Linux using an Embrava V30 USB connected light.

Install

  1. pip

$ pip install blynclight
  1. Clone the repo

$ git clone https://github.com/JnyJny/blynclight.git
$ cd blynclight; pip install -e .

Usage

Once installed, the BlyncLight is yours to command!

from blynclight import BlyncLight_API

light = BlyncLight_API.first_light()

red, green, blue = (255, 0, 0), (0, 255, 0), (0, 0, 255)

light.color = green           # the light is off and green
light.on = True               # the light is on and green
light.flash = True            # the light is on, flashing and green
light.color = red             # the light is on, flashing and red
light.flash = False           # the light is on and red
light.bright = False          # the light is on, dim and red
light.color = blue            # the light is on, dim and blue
light.bright = True           # the light is on and blue
light.on = False              # the light is off and blue

More examples can be found in the contrib directory of the git repo.

Build

Embrava distributes a Software Development Kit (SDK) for Windows, MacOS and Linux that developers must first request access to. The MacOS and Linux SDKs provide access to BlyncLight devices via a static library archive. Developers then link their applications against the static library. Unfortunately, Python cannot access static library archives via the the ctypes module. Fortunately, it is relatively easy to unpackage a static library archive into object files and construct a dynamic or shared object. Provided of course that the archived objects are suitable for linking (compiled as position independent code and the right word length as the target python).

  1. Register with Embrava and receive SDK URLs for your operating system.

  2. Clone the repo

$ git clone https://github.com/JnyJny/blynclight.git
  1. Build and install the shared object from the SDK

$ cd blynclight/blynclight_api && make URL=PLATFORM_URL install
  1. Install the package

$ cd .. ; pip install -e .

Uninstall with pip:

$ pip uninstall blynclight

Release files for blynclight 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blynclight 0.1.5
File Size Uploaded
blynclight-0.1.5.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for blynclight 0.1.5
File Interpreter ABI Platform
blynclight-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 11.8 kB

Release files / blynclight-0.1.5.tar.gz

Download URL blynclight-0.1.5.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
98b73bc5a6da2493233f3641f9f948373600c25e50485db758645e36c4fce26d
BLAKE2b-256 checksum
How to use checksums
30e961259cab51b7ebb52eae79baafd109427d8e33818cc3871e0854c660af29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

Release files / blynclight-0.1.5-py3-none-any.whl

Download URL blynclight-0.1.5-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f76fb2f5ac37cf0cc9f56b8af380df793a915427965ebfab5e9c46f3c5befb3
BLAKE2b-256 checksum
How to use checksums
dd4c4df03e0d7a22d349201ee0194828e4b1d02e15b8f9b05283be8a117a17fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

Release history Release notifications | RSS feed

0.12.0

2 release files

0.11.0

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.2

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.4

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.3.1

2 release files

0.2.0

2 release files

0.1.6

2 release files

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page