SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

pip install systemlink-sdk ?

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?

0 Kudos
Message 1 of 8
(3,069 Views)

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

 

0 Kudos
Message 2 of 8
(3,051 Views)

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

0 Kudos
Message 3 of 8
(3,044 Views)

@JoshuaP Has there been any update on getting the Python SDK added to a venv in a local python instance? 

0 Kudos
Message 4 of 8
(129 Views)

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.

Cheers!

TJ G
0 Kudos
Message 5 of 8
(114 Views)

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. 

0 Kudos
Message 6 of 8
(104 Views)

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

Message 7 of 8
(70 Views)

@SantoshSS That resolves it. Ill have to go look through the Python API documentation for the new version and correct. Thanks for the help. 

0 Kudos
Message 8 of 8
(66 Views)