Pythonic client and viewer LADS OPC UA libraries.
Python can be downloaded from the official website python.org. The libraries are compatible with Python 3.12 and later. If you have an older version of Python installed, it is recommended to install a newer version in order to use the libraries. The libraries are currently not available on PyPi and need to be installed from source. Check if Python is installed on your system with the following command for Windows users:
py --version
for Linux users:
python3 --version
On Windows, if no version is shown but Python is installed, check if Python is added to the Environmental Variables.
Ideally, the libraries should be installed in a virtual environment. Create a virtual environment with the following command for Windows users:
py -m venv .venv
for Linux users:
python3 -m venv .venv
Note that you can choose a different name for the virtual environment than .venv
. Then, activate the virtual environment with the following command if you are using windows and Command Prompt (cmd):
.venv\Scripts\activate
for Linux users:
source .venv/bin/activate
See the Python Packaging User Guide for more information on creating and managing a Python virtual environment.
The build library is required to build the libraries. It can be installed with the following command:
pip install build
Within the /dev folder you will find powershell und bash scripts which help to automate the steps which are outlined in the following.
The lads_opcua_client library can be build and installed with the following command for Windows users:
cd lads_opcua_client
py -m build
pip install dist/lads_opcua_client-0.0.1.tar.gz
for Linux users:
cd lads_opcua_client
python3 -m build
pip install dist/lads_opcua_client-0.0.1.tar.gz
The lads_opcua_viewer library requires the client library to be installed in the same environment. The viewer library can be build and installed with the following command for Windows users:
cd lads_opcua_viewer
py -m build
pip install dist/lads_opcua_viewer-0.0.1.tar.gz
for Linux users:
cd lads_opcua_viewer
python3 -m build
pip install dist/lads_opcua_viewer-0.0.1.tar.gz
The /dev folder contains scripts which ease building and installing the packages for client and viewer. For Windows users they are written as powershell scripts: for Linux users as bash scripts.
build_and_install # build and install both packages
install_editable # make source code editable and debugable
The lads_opcua_client library provides a Pythonic interface to the LADS OPC UA server. Consult the client README file in the package directory for further information. The lads_opcua_viewer library provides a Streamlit based viewer for the LADS OPC UA server. Consult the viewer README file in the package directory for further information. Note that the viewer depends on the client library and requires it to be installed in the same environment.