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....