Skip to main content
Pre-release

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

opensmi_client-1.0.0rc1.tar.gz (31.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opensmi_client-1.0.0rc1-py3-none-any.whl (35.4 kB view details)

Uploaded Python 3

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

Hashes for opensmi_client-1.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 00e8e2114672eea32a1575fc07fc152f9e35ec469e66ef68b06972bef0f407ef
MD5 477177782f72442a49bbeab2459e7119
BLAKE2b-256 5981741635ef6691383aa2da6b39004a8f5226282f05516e15e8d9695e4d30c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for opensmi_client-1.0.0rc1.tar.gz:

Publisher: python-publish.yml on SmartFactory-KL/opensmi-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opensmi_client-1.0.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for opensmi_client-1.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 acfc8b25f00a4c17c66e416633ca8c5ccb7f37df6ab527ffc6af7166619d757d
MD5 e4b68bc6719dbe5543b11486f4d634bc
BLAKE2b-256 bc487781deea3b2328ee526201c5678e428b974432bd719bb4cd2ddbf4c2038f

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.0rc1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page