This package allows one to control a USB relay bank. This code currently is only tested with a KMTronic USB eight bank relay, however, can be extended to work with any device.
This package was created with and includes only free software and is licensed under GPLv3 or any later version. A copy of this license is found in the file gpl-3.0.txt.
The python-usbrelay library uses the excellent python-serial library.
Examples and details are available in the Sphinx documentation.
Link:
https://bitbucket.org/schryer/usbrelay
Download:
info.kmtronic.com/software/USB_Relays/schryer-python-kmtronic-usbrelay.zip
Many thanks David for this example!