12-27-2021 02:48 PM - edited 12-27-2021 02:52 PM
Our on-prem Systemlink server includes helpful links to HTTP and Python API documentation, which is nice. I'd like to be able to leverage the systemlink-sdk package in a custom python app--is there a way to pip install it on my local machine for development purposes?
I managed to find the module under C:\Program Files\National Instruments\Shared\Skyline\Python\3.8\Lib\site-packages on our Systemlink server, but I am not seeing an obvious way to pip install it in a virtual environment on my machine:
$ pip install systemlink-sdk
ERROR: Could not find a version that satisfies the requirement systemlink-sdk (from versions: none)
ERROR: No matching distribution found for systemlink-sdk
Is that something we should be able to do, and if so, can you provide instructions on how we can install that module?
I'm guessing it would involve specifying a python module index location, sorta like this:
$ pip install -i http://www.ni.com --trusted-host http://www.ni.com systemlink-sdk
But I'm not having any luck with that. Is there an NI-hosted package index that we can point to for installing things like this?
12-27-2021 07:39 PM
We have a pip package, however it only includes the tag API currently.
https://pypi.org/project/nisystemlink-clients/
If you want the full SystemLink Python SDK you will need to install the SystemLink Client on your development system and select the optional Python SDK from the NI Package Manager installer.
https://www.ni.com/en-us/support/downloads/software-products/download.systemlink-client.html
12-27-2021 07:58 PM
Thanks, @JoshuaP. I had just stumbled upon https://github.com/ni/systemlink-server-examples/tree/master/python/testmonitor/results and was in the process of installing the Systemlink Client package when I saw your response notification.
I haven't actually been able to install it successfully yet (getting timeout errors on NIPM installation...but that's probably a separate thread in and of itself), but from the above GitHub link, it seems that installing the package will just put it in some absolute path, so I suppose we would have to hardcode that dependency in any python code.
It would be nice if we could just declare it in a requirements.txt file and pip install it within a virtual environment context....
03-19-2025 02:25 PM
@JoshuaP Has there been any update on getting the Python SDK added to a venv in a local python instance?
03-20-2025 10:43 AM
Additional APIs have been added to the python package here: nisystemlink-clients-python/README.rst at master · ni/nisystemlink-clients-python
I'll note that not all of them have been added just yet but if you have a specific API you'd like to see made available, instead of relying on the requests library and the routes directly, then please let us know in the issues and we'll try to prioritize appropriately.
03-20-2025 01:01 PM
nisystemlink-clients package installs fine from pip. Its when trying to use systemlink.clients.nitestmonitor in VScode that it doesn't resolve the dependencies. I am assuming its because of the systemlink-sdk module that is missing, but timeout when attempting to install with the client.
03-25-2025 07:03 AM
With the new nisystemlink-clients package, there are some module name changes. Please use `nisystemlink.clients.testmonitor` instead of `systemlink.clients.nitestmonitor`. For more information on different client usage, see these examples.
Thanks,
Santosh
03-25-2025 08:08 AM
@SantoshSS That resolves it. Ill have to go look through the Python API documentation for the new version and correct. Thanks for the help.