Skip to main content

Python API for the Luxafor Flag

Project description


.. image::

.. image::

.. image::
:alt: Documentation Status

.. image::
:alt: Updates

Python API for the Luxafor Flag

* Free software: MIT license
* Documentation:


* Python 3+
* Simple, clean API to control the
`Luxafor Flag <>`
* Where possible, allows the setting of multiple, specific LEDs at once.


Install via pip::

$ pip install pyluxafor

Create the file: `/etc/udev/rules.d/10-luxafor.rules` with the following

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idProduct}=="f372", ATTRS{idVendor}=="04d8", MODE:="666"

Then reload udev::

$ sudo service udev reload

Then unplug your Luxafor Flag and reinsert it.

Example usage


from pyluxafor import LuxaforFlag
from time import sleep

flag = LuxaforFlag()
leds=[LuxaforFlag.LED_TAB_1, LuxaforFlag.LED_BACK_1, LuxaforFlag.LED_BACK_2],
r=10, g=10, b=0,
flag.do_static_colour(leds=LuxaforFlag.LED_BACK_3, r=0, g=0, b=100)


flag.do_pattern(LuxaforFlag.PATTERN_POLICE, 3)


Many thanks to `vmitchell85 <>` for his
`luxafor-python <>` project,
which provided the initial inspiration for this project, and provided easy
answers to the problems I encountered.

If you're looking to control a Luxafor Flag in Windows using Python,
vmitchell85's project is probably the best bet:



0.1.0 (2016-12-13)

* First release on PyPI.

Project details

Download files

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

Files for pyluxafor, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size pyluxafor-0.2.0-py2.py3-none-any.whl (6.0 kB) File type Wheel Python version 3.5 Upload date Hashes View hashes
Filename, size pyluxafor-0.2.0.tar.gz (23.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page