SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

nitdmreader on development machine

I'm working on an analysis routine that will utilize the 

systemlink.clients.nitdmreader

 package. Specifically 

metadata_api = tdmreader.MetadataApi()
data_api = tdmreader.DataApi()

Now, the development experience in the online jupyterhub is less than desirable. 

I'm hoping to build my functionality into my own package which will be deployed to SystemLink Server, so that several of our notebooks can utilize it. 

Is there a way to have this package locally on my machine, as it appears to use the REST api anyways?

 

Thanks

0 Kudos
Message 1 of 5
(110 Views)

I just realized that these are the generated openapi endpoints and I just need to generate the client classes. 

 

Does anyone have a script to generate all the endpoint clients? 

0 Kudos
Message 2 of 5
(98 Views)

Hello,

 

I went poking around to confirm that this package isn't available in any of the public PyPI packages, and you're right its not. You may be able to pull it out of the python directory on your Server machine and put it in the site-packages folder on your dev machine, but I'm not sure how realistic that is.

 

I was able to generate an endpoint client using a trial version of SwaggerEditor. I'll attach the generated zip here.

 

Is there any particular reason you're not just using the file download APIs and npTDMS? What 'higher-level' functionality are you using from the TDMSReader service?

Cheers!

TJ G
Message 3 of 5
(72 Views)

Ah, I just saw that you found the open-api endpoints on the server, not an actual python client. I didn't think we shipped one anywhere, so that makes more sense to me.

Cheers!

TJ G
0 Kudos
Message 4 of 5
(48 Views)

Hey TJ,

 

Thanks for the info. A couple things:

 

1) If I poke around the package on the server directly, I see that the the sdk probably used to be publicly available (url from METADATA file in C:\Program Files\National Instruments\Shared\Skyline\Python\3.8\Lib\site-packages\systemlink_sdk-24.0.0.dist-info): https://github.com/ni/systemlink-python-sdk/

2) I'm working with an automated analysis script that triggers of a data indexer, which gives me a dfs:/ url to the file that was indexed. From what I can tell the proper way to access these files is from the TDM Reader Service. Which I also got from: https://github.com/ni/systemlink-server-examples/blob/master/jupyter/analysis-automation/BasicExampl... 

3) from what I've understood, in SLS the file service does not give access to files indexed by the DFS service.

 

The main reason for going through the TDM Reader service is the raw files we get in are a variety of formats, so we're using the automated analysis routine as a step to do the conversion to TDMS for ingestion.

0 Kudos
Message 5 of 5
(21 Views)