Skip to content

OPCFoundation/opcua-webapi-python

Repository files navigation

opcua-webapi

Provides simple HTTPS based access to an OPC UA server.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.05.4
  • Package version: 1.504.0
  • Generator version: 7.9.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.7+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import opcua_webapi

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import opcua_webapi

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import opcua_webapi
from opcua_webapi.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:4840
# See configuration.py for a list of all supported configuration parameters.
configuration = opcua_webapi.Configuration(
    host = "http://localhost:4840"
)



# Enter a context with an instance of the API client
with opcua_webapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = opcua_webapi.DefaultApi(api_client)
    activate_session_request = opcua_webapi.ActivateSessionRequest() # ActivateSessionRequest | ActivateSessionRequestMessage (optional)

    try:
        api_response = api_instance.activate_session(activate_session_request=activate_session_request)
        print("The response of DefaultApi->activate_session:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DefaultApi->activate_session: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost:4840

Class Method HTTP request Description
DefaultApi activate_session POST /activatesession
DefaultApi browse POST /browse
DefaultApi browse_next POST /browsenext
DefaultApi call POST /call
DefaultApi cancel POST /cancel
DefaultApi close_session POST /closesession
DefaultApi create_monitored_items POST /createmonitoreditems
DefaultApi create_session POST /createsession
DefaultApi create_subscription POST /createsubscription
DefaultApi delete_monitored_items POST /deletemonitoreditems
DefaultApi delete_subscriptions POST /deletesubscriptions
DefaultApi find_servers POST /findservers
DefaultApi get_endpoints POST /getendpoints
DefaultApi history_read POST /historyread
DefaultApi history_update POST /historyupdate
DefaultApi modify_monitored_items POST /modifymonitoreditems
DefaultApi modify_subscription POST /modifysubscription
DefaultApi publish POST /publish
DefaultApi read POST /read
DefaultApi register_nodes POST /registernodes
DefaultApi republish POST /republish
DefaultApi set_monitoring_mode POST /setmonitoringmode
DefaultApi set_publishing_mode POST /setpublishingmode
DefaultApi set_triggering POST /settriggering
DefaultApi transfer_subscriptions POST /transfersubscriptions
DefaultApi translate_browse_paths_to_node_ids POST /translate
DefaultApi unregister_nodes POST /unregisternodes
DefaultApi write POST /write

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

office@opcfoundation.org

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published