This repository has the source code package of the PI Web API client for Python. PI Web API 2018 swagger specification was used to create this package.
- PI Web API 2018+ instance available on your domain or a public network.
If the python package is hosted on Github, you can install directly from Github
pip install pidevguru.piwebapi
Install via Setuptools.
python setup.py install --user
All PI Web API server methods are mapped on this client. Please refer to PI Web API help page.
from pidevguru.piwebapi.pi_web_api_client import PIWebApiClient
piwebapi = PIWebApiClient("https://webserver/piwebapi", verifySsl=True)
piwebapi.set_basic_auth("username", "password")
from pidevguru.piwebapi.pi_web_api_client import PIWebApiClient
piwebapi = PIWebApiClient("https://webserver/piwebapi", verifySsl=False)
piwebapi.set_kerberos_auth()
dataServer = piwebapi.dataServer.get_by_path("\\\\PISRV1");
newPoint = PIPoint()
newPoint.name = "SINUSOID_TEST"
newPoint.descriptor = "Test PI Point for Python PI Web API Client"
newPoint.point_class = "classic"
newPoint.point_type = "float32"
newPoint.future = False
res = piwebapi.dataServer.create_point_with_http_info(dataServer.web_id, newPoint);
point1 = piwebapi.point.get_by_path("\\\\PISRV1\\sinusoid");
Copyright 2023 PIDevGuru.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Please see the file named LICENSE.md.