Python implementation of the cusb interface for managed USB hubs
Project description
pycusb
A python library for managed USB hubs that are usually operated by a command line tool called cusbi (Linux Intel), cusba (Linux Arm), cusbm (Mac), or CUSBC/CUSBCTL (Windows), e.g., hubs from the companies EXSYS and StarTech.
Usage
from cusb import CUsb
import time
# Example:
path_to_device = "/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_B0036Y2H-if00-port0"
port = 1
with CUsb(path_to_device) as hub:
hub.port_power_on(port, False)
time.sleep(1)
hub.port_power_on(port, True)
Installation
as library
Add pycusb to your pyproject.toml:
[project]
dependencies = [
"pycusb",
]
as CLI tool
Create and activate a virtual environment, then run
pip install git+https://github.com/gschwaer/pycusb.git
Development
Clone repo, create and activate a virtual environment, then install dependencies with:
pip install -e '.[dev]'
Test with
pytest test/test.py
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycusb-0.0.0.tar.gz.
File metadata
- Download URL: pycusb-0.0.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35c0e695b50a26c3ec3627fde129ff2da63c7c747193161a3e7ac906afe8d641
|
|
| MD5 |
2a5a6fc55bd7b6589d5270d7315159a9
|
|
| BLAKE2b-256 |
9405dee4c6879f071779c8d33426d9da8583a77d08d3ac14c4394f30fbb79686
|
Provenance
The following attestation bundles were made for pycusb-0.0.0.tar.gz:
Publisher:
release.yaml on gschwaer/pycusb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycusb-0.0.0.tar.gz -
Subject digest:
35c0e695b50a26c3ec3627fde129ff2da63c7c747193161a3e7ac906afe8d641 - Sigstore transparency entry: 273542683
- Sigstore integration time:
-
Permalink:
gschwaer/pycusb@5d22a81b5460c7ee0400e83c33fa08fba95b0b10 -
Branch / Tag:
refs/tags/v0.0.0 - Owner: https://github.com/gschwaer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@5d22a81b5460c7ee0400e83c33fa08fba95b0b10 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pycusb-0.0.0-py2.py3-none-any.whl.
File metadata
- Download URL: pycusb-0.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06207e1db04f376c07dd1c284e9e007579b7952a5aae4f851b2a5088996f40de
|
|
| MD5 |
8e243227f80a6a660fb9dd238cf68592
|
|
| BLAKE2b-256 |
c8da82dc84d9d8047bc2a2bea2f2614bed6d6f38d2d9a4015a1e2f1c22e216a7
|
Provenance
The following attestation bundles were made for pycusb-0.0.0-py2.py3-none-any.whl:
Publisher:
release.yaml on gschwaer/pycusb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycusb-0.0.0-py2.py3-none-any.whl -
Subject digest:
06207e1db04f376c07dd1c284e9e007579b7952a5aae4f851b2a5088996f40de - Sigstore transparency entry: 273542684
- Sigstore integration time:
-
Permalink:
gschwaer/pycusb@5d22a81b5460c7ee0400e83c33fa08fba95b0b10 -
Branch / Tag:
refs/tags/v0.0.0 - Owner: https://github.com/gschwaer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@5d22a81b5460c7ee0400e83c33fa08fba95b0b10 -
Trigger Event:
push
-
Statement type: