Python3 modul and cli tool to controll the Cleware traffic light
Project description
cleware-traffic-light
cleware-traffic-light an easy to use CLI tool written in Python3 to control the cleware USB traffic light. It supports multiple traffic light control and the usage as a module in your own Python application.
Usage
Module
from cleware-traffic-light import ClewareTrafficLight, Color, State
ClewareTrafficLight().red_on()
ClewareTrafficLight().yellow_off()
# with address for specific light
ClewareTrafficLight(21).green_on()
CLI
ctl --red on
ctl -r on
ctl --red on --green off
ctl --red off --green on --address 19
Installation
use pip to install cleware-traffic-light
pip3 install cleware-traffic-light
Help
usage: traffic_light [-h] [-r {on,off}] [-y {on,off}] [-g {on,off}]
[-a ADDRESS]
Turns the led of the cleware traffic light on or off
optional arguments:
-h, --help show this help message and exit
-r {on,off}, --red {on,off}
Controlls the red led
-y {on,off}, --yellow {on,off}
Controlls the yellow led
-g {on,off}, --green {on,off}
Controlls the green led
-a ADDRESS, --address ADDRESS
Specifies which traffic light should be used
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for cleware-traffic-light-1.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 156332212b10def855fdc21f54a1ad13f9b36b5870df168b945cdf9d4d9ffa31 |
|
MD5 | ba3714a153dce0d709220a2c3e2875b9 |
|
BLAKE2b-256 | bff25f71893fb53ee8319314759a998361c3832713026751fe3b96db449f73b3 |
Close
Hashes for cleware_traffic_light-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bbd7425e6d9856ec79861f135e6fb19d5803c6cb981981e420f21b7886f2f99 |
|
MD5 | a6d1749bd062b686f0a10ad2f64869b6 |
|
BLAKE2b-256 | 4b15b7c197eae2bf70d24305b05fd4188a892f3564d187db4a5fa9d018e15f07 |