Python API for Lanner PSP
A Python interface to access Lanner PSP.
About
Lanner PSP aims to simplify and enhance the efficiency of customer’s application implementation. When developers intend to write an application that involves hardware access, they were required to fully understand the specifications to utilize the drivers. This is often being considered a time- consuming job which requires lots of related knowledge and time. In order to achieve better full access hardware functionality, Lanner invests great effort to ease customer’s development journey with the release of a suite of reliable Software APIs.
“Python API for Lanner PSP” uses Python to call the shared object file generated after PSP compilation to execute PSP functions, and encapsulates many C functions in PSP into Python interfaces, so please make sure to install Core SDK before use.
If your Core SDK was installed via the One-Step Automated Install method, you can use it out of the box, otherwise you should set the liblmbio.so and liblmbapi.so paths before instantiating other objects. For example:
from lannerpsp import PSP, HWM
PSP.lmb_io_path = "/path/to/liblmbio.so"
PSP.lmb_api_path = "/path/to/liblmbapi.so"
hwm = HWM()
hwm.get_cpu_temp(1)
...
Assuming you want to obtain the sensors data for the hardware monitor:
from lannerpsp import HWM
hwm = HWM()
sensors = hwm.list_supported_sensors()
for s in sensors:
print(f"{s.display_name} = {s.value} {s.unit}")
Then run it with ROOT privileges, the output will be like:
CPU 1 temperature = 41 C
SYS 1 temperature = 42 C
CPU 1 Vcore = 0.856 V
5V = 5.087 V
3.3V = 3.35 V
Battery = 3.184 V
DDR channel 1 = 1.104 V
For complete usage, please refer to the documentation.
Concurrency and Parallelism
Lanner PSP invokes many underlying hardware interfaces for communication, such as IPMI, SMBus, Super I/O, or some MCUs. Some PSP functions may occupy the same communication channel, such as UART or I2C, etc. Please avoid using multi-process or multi-threading unless you can ensure they will not cause errors due to simultaneous access to the same channel.
Installation
To use the “Python API for Lanner PSP”, you must have ROOT privileges and the Core SDK must be installed first. To install “Python API for Lanner PSP”, see the Installation chapter.
Documentation
Comprehensive documentation is available at https://psp-api-python.readthedocs.io/.
Issues and questions
If you have a feature request or bug report, please open an issue on GitHub. If you have a question or need help, this may be better suited to Lanner’s official online customer service.
Python support
Metadata
Release files for lannerpsp 0.0.15
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 |
|---|---|---|---|---|
| lannerpsp-0.0.15.tar.gz | 1.3 MB | Without provenance | Details for lannerpsp-0.0.15.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lannerpsp-0.0.15-py3-none-any.whl | Python 3 | none | any | Details for lannerpsp-0.0.15-py3-none-any.whl |
Total release size: 1.3 MB
Release files / lannerpsp-0.0.15.tar.gz
| Download URL | lannerpsp-0.0.15.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08a96e5102c61589e8e6f172996c7545c6b40280c5de7eee80c24302d5da30ac
|
|
BLAKE2b-256 checksum How to use checksums |
fece8b50b301577b87fe0ad3c38ed2fbe0e0877154fce9b84acd9474d73be41a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Release files / lannerpsp-0.0.15-py3-none-any.whl
| Download URL | lannerpsp-0.0.15-py3-none-any.whl |
|---|---|
| Size | 48.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
083affc24fc7c4d9f0c4865f2e6cdd1af5cdcae766c32b5cb43c196b2d0d2603
|
|
BLAKE2b-256 checksum How to use checksums |
8ea6ab28f8dddfa9c1e3970f7cd00c0a20cfc93afc4e74421cc40333242a9094
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Security for lannerpsp 0.0.15
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.