3. Development

The main GitHub repository for the project can be found at:

3.1. Development installation

$ sudo apt install python3-pip python3-venv
$ cd
$ git clone git@github.com:lanneriotsw/psp-api-python.git
$ cd psp-api-python
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip install .[test,doc,dev]

3.2. Building the docs

$ cd ~/psp-api-python
$ source venv/bin/activate
(venv) $ make html -C docs

3.3. Low Level API usage

Call PSP functions from the C DLL via the PSP.lib property:

from lannerpsp import PSP, get_psp_exc_msg

with PSP() as psp:  # Automatically Init() and DeInit().
    # Get the DLL/SO to call C functions by `lib` property.
    # Example to set LTE Status LED to green blink.
    i_ret = psp.lib.LMB_SLED_SetLteStateLED(4)
msg = get_psp_exc_msg("LMB_SLED_SetLteStateLED", i_ret)
print(msg)