Version: 1.5.6
The sample code in this demonstrates how to invoke the Data View REST API via the sample Python client library. The sample demonstrates how to establish a connection to SDS, obtain an authorization token, create an SdsType and SdsStream with data (if needed), create a Data View, update it, retrieve it, and retrieve data from it in different ways. At the end of the sample, everything that was created is deleted.
This example uses the adh_sample_library_preview library which is also included in this github repo. It is downloadable via pip.
Developed against Python 3.9.5.
- Clone the GitHub repository
- Install required modules:
pip install -r requirements.txt
- Open the folder with your favorite IDE
- The sample is configured using the file appsettings.placeholder.json. Before editing, rename this file to
appsettings.json
. This repository's.gitignore
rules should prevent the file from ever being checked in to any fork or branch, to ensure credentials are not compromised. - Update
appsettings.json
with the credentials provided by AVEVA - Run
program.py
To test the sample after running it:
- Run
python test.py
or
- Install pytest
pip install pytest
- Run
pytest program.py
Automated test uses Python 3.9.5 x64
For the main Cds data views samples page ReadMe
For the main Cds samples page ReadMe
For the main AVEVA samples page ReadMe