cspb
The cspb package contains a python driver class for communications with the Cluster System Power Board (cspb) hardware.
Introduction
The cspb package contains a wrapper driver around the smbus package. It enables easy communication with the cluster system power board hardware via an i2c bus.
Currently supported methods are:
-
set_power
-
shutdown
-
signal_shutdown
-
read_register
-
write_register
-
set_register_number
-
send_command
Dependencies
This driver depends on the [smbus ](smbus · PyPI)package.
CSPB code examples
Example 1: Display the current power state
from cspb.CSPB import CSPB
i2c_bus_number = 1
i2c_address = 21
cspb = CSPB(i2c_bus_number, i2c_address)
power_state = cspb.read_register(cspb.PWR_STTS_REGSTR_ADDR)
print(power_state)
Example 2: Request shutdown of all power slots
from cspb.CSPB import CSPB
i2c_bus_number = 1
i2c_address = 21
cspb = CSPB(i2c_bus_number, i2c_address)
cspb.shutdown(#ff)
Installation Instructions
cspb is a pure Python and requires no compilation. Install as follows:
pip install cspb
Metadata
Release files for cspb 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cspb-1.0.0.tar.gz | 4.0 kB | Without provenance | Details for cspb-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cspb-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for cspb-1.0.0-py3-none-any.whl |
Total release size: 8.9 kB
Release files / cspb-1.0.0.tar.gz
| Download URL | cspb-1.0.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c66d56ac517fdd9f492a5d8efabd7927dd79106ae295fac0f5aa3e321f04980
|
|
BLAKE2b-256 checksum How to use checksums |
4fbfe1467ab78a9390d18ea98b9fbee2daba0fc9e32e745fa4685ff69d1b3c09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
|
Release files / cspb-1.0.0-py3-none-any.whl
| Download URL | cspb-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f4ddd93070b9fde8cfc280a235d8e12e05f28d04747f9dc9d39014407cdf4b3
|
|
BLAKE2b-256 checksum How to use checksums |
2fef0b7a412638463b7900f5165c254655fbade441922c495090657349a7295a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
|
Security for cspb 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.