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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5e49bf5b15ac6d3c5d6d6ec679f2ad9130f81f7b136301d4d4475d8a911da0c |
|
MD5 | 536ebeed30480c2aec42d0761b6921a3 |
|
BLAKE2b-256 | fecb289d1f0ebd400a66deb32ae7b83cfb0b3313145872195adc3ce0dfc086d7 |
Close
Hashes for cleware_traffic_light-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd7e2aea25d0faaa2b3d4d6ba776689b1a68ac4e509ade44897c7b2d6c7122cf |
|
MD5 | d72c6e74361d135af40fb389fdb4c87c |
|
BLAKE2b-256 | 75e946babfc40bae9fcb8046ff74a568826d729444a671e985df208f5b8c3926 |