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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e10c900e4248a27ba734b5d53c292983479211fad45ae0aafc84b20af8fe239e |
|
MD5 | aa986ad68e5f229ca407531b542aa9c9 |
|
BLAKE2b-256 | 598c340c451a8a74ee21c7f7e1a96bc9c20af5d1ebd532709dd4e191f37e3e7c |
Close
Hashes for cleware_traffic_light-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bd88bfcf798b7f7a0c86089eab04352e342d3ae69cbb0c64d4df26687ba5156 |
|
MD5 | a43502ec2ab71cf258cbeea501eaabdd |
|
BLAKE2b-256 | 08c59e841579afe7c371595d9af9a315c27051ab2c3f32bbada402cc3f9c4471 |