This release is a pre-release and may not be stable for production use.
OpenSMI Client
OpenSMI Client is the client half of the OpenSMI framework: a Python library for connecting to any SMI-compliant OPC UA server — generically discovering its machines, components and skills, and interacting with them without needing a generated, server-specific client.
Since SMI defines a standardized information model, OpenSMI Client doesn't need to know your server's specific machine/skill types ahead of time — it browses the address space at runtime and exposes what it finds through a consistent Python API.
Browsing is optional, though: if you already know the relevant node IDs (e.g. from the server's configuration, or cached from a previous run), you can point the client directly at them and skip discovery entirely, or mix both approaches — browse once to locate a machine, then operate on it and its sub-objects using known nodes from there on.
Requirements
- Python 3.11+
- An SMI-compliant OPC UA server to connect to (e.g. one built with OpenSMI-Server)
Installation
pip install opensmi-client
Quick Start
import asyncio
from opensmi.core import SkillState
from opensmi.client import RemoteServer
async def main() -> None:
# remember: do not commit the actual password to version control...
async with RemoteServer("opc.tcp://localhost:4841/", username="operator", password="operator") as server:
machine = server.machines["ExampleMachine"]
await machine.lock.init_lock()
skill = machine.skill_set["ExampleSkill"]
# reset the Skill if necessary
if await skill.read_current_state() != SkillState.READY:
await skill.reset(wait_for=SkillState.READY)
# bulk write the parameters
await skill.parameter_set.write_all({"x": 5, "y": 10})
# start the skill and wait for completion
await skill.start(wait_for=SkillState.COMPLETED)
# retrieve the results before resetting
print("results:", await skill.final_result_data.read_all())
await skill.reset(wait_for=SkillState.READY)
if __name__ == "__main__":
asyncio.run(main())
This connects to the ExampleMachine from the server quick start, locks it, drives its
ExampleSkill through a full parameter-write → start → completion → read-result → reset cycle, and prints the
computed sum.
Project Status
The client API is stable and follows semantic versioning. Changes to the underlying OPC UA information model are incorporated as needed but kept backwards compatible, and do not change the Python API — code written against OpenSMI Client should keep working across information-model revisions.
License
The library itself is licensed under the MIT License.
Example code contained in the examples directory is dedicated to the public domain under the CC0 1.0 Universal license.
This text was drafted with AI assistance (Claude, Anthropic) and reviewed/edited by the author before publication.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opensmi_client-1.0.0rc1.tar.gz.
File metadata
- Download URL: opensmi_client-1.0.0rc1.tar.gz
- Upload date:
- Size: 31.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00e8e2114672eea32a1575fc07fc152f9e35ec469e66ef68b06972bef0f407ef
|
|
| MD5 |
477177782f72442a49bbeab2459e7119
|
|
| BLAKE2b-256 |
5981741635ef6691383aa2da6b39004a8f5226282f05516e15e8d9695e4d30c0
|
Provenance
The following attestation bundles were made for opensmi_client-1.0.0rc1.tar.gz:
Publisher:
python-publish.yml on SmartFactory-KL/opensmi-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opensmi_client-1.0.0rc1.tar.gz -
Subject digest:
00e8e2114672eea32a1575fc07fc152f9e35ec469e66ef68b06972bef0f407ef - Sigstore transparency entry: 2841585383
- Sigstore integration time:
-
Permalink:
SmartFactory-KL/opensmi-client@439dccda170f25a530651ffd930978199c8c483c -
Branch / Tag:
refs/tags/v1.0.0-rc.1 - Owner: https://github.com/SmartFactory-KL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@439dccda170f25a530651ffd930978199c8c483c -
Trigger Event:
release
-
Statement type:
File details
Details for the file opensmi_client-1.0.0rc1-py3-none-any.whl.
File metadata
- Download URL: opensmi_client-1.0.0rc1-py3-none-any.whl
- Upload date:
- Size: 35.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acfc8b25f00a4c17c66e416633ca8c5ccb7f37df6ab527ffc6af7166619d757d
|
|
| MD5 |
e4b68bc6719dbe5543b11486f4d634bc
|
|
| BLAKE2b-256 |
bc487781deea3b2328ee526201c5678e428b974432bd719bb4cd2ddbf4c2038f
|
Provenance
The following attestation bundles were made for opensmi_client-1.0.0rc1-py3-none-any.whl:
Publisher:
python-publish.yml on SmartFactory-KL/opensmi-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opensmi_client-1.0.0rc1-py3-none-any.whl -
Subject digest:
acfc8b25f00a4c17c66e416633ca8c5ccb7f37df6ab527ffc6af7166619d757d - Sigstore transparency entry: 2841585427
- Sigstore integration time:
-
Permalink:
SmartFactory-KL/opensmi-client@439dccda170f25a530651ffd930978199c8c483c -
Branch / Tag:
refs/tags/v1.0.0-rc.1 - Owner: https://github.com/SmartFactory-KL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@439dccda170f25a530651ffd930978199c8c483c -
Trigger Event:
release
-
Statement type: