Skip to main content

A lightwight python control module for MCD USB Hubs

Project description

A lightwight python control module for MCD USB Hubs

"USB Hub 2.0 6-Port, Switchable"

image

This python module controls the switches of usb hub. This very first release supports only a basic functionality such as enable and disable a port. The control interface would support much more functionality.

For more details on the hub see: https://www.mcd-elektronik.com/products/conline-control-systems/usb-hub-20-6-port-switchable.html

How to use this module

The usage of the python module is shown in the very basic ./examples/example.py

Installation

From PyPI

Download and install the latest package:

pip3 install mcd_usb_hub_ctrl

From the sources:

python the first time

Install the python interpreter

On windows download the actual python interpreter from python.org. Do not use the automatic windows installer to install python. On Linux install python with the package manager of your os.

Create a virtual python environment

This has only to be done once to create the virtual environment

python3 -m venv .venv

Init the python virtual environment

This is needed every time you open the shell

On linux systems

source .venv/bin/activate

On windows systems

.venv\Scripts\activate

Get the required packages to be up and running

This has only to be done once to use the lib

pip install -r requirements.txt

And for dev purposes some additional packages:

pip install -r requirements_dev.txt

Build the whl-file

Then finally as soon as you have installed all dependencies, run make build to compile the wheels file and install it with pip.

make build

pip install ./build/mcd_usb_hub_ctrl-<version>-none-any.whl

Project details


Download files

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

Source Distribution

mcd_usb_hub_ctrl-0.1.4.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcd_usb_hub_ctrl-0.1.4-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file mcd_usb_hub_ctrl-0.1.4.tar.gz.

File metadata

  • Download URL: mcd_usb_hub_ctrl-0.1.4.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for mcd_usb_hub_ctrl-0.1.4.tar.gz
Algorithm Hash digest
SHA256 d7df1b4b81e0d210b739f6683d7ecdebe4ca0704a8d7adb6ef170ae146f020d2
MD5 26fb417875ed83fd16a401bfbc87ccb0
BLAKE2b-256 fc9a4ef4afe79ac7748dee9f77d20e4fec0bc0a17783f89d11a0129a73e71c5f

See more details on using hashes here.

File details

Details for the file mcd_usb_hub_ctrl-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for mcd_usb_hub_ctrl-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b7a0cf2de806fcfb57e56e0e6c8d875f1e94bd3f66d50b13ea11af72d77d35a4
MD5 307b243ec6125428421732f4481a11ed
BLAKE2b-256 f410301189202f207029ceca1695a661918d3019c7f1a15c53efb757f22110d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page