Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

OpenSMI Logo

Docs PyPI version Python versions License

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.

Metadata

Release files for OpenSMI-Client 1.0.0rc2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for OpenSMI-Client 1.0.0rc2
File Size Uploaded Provenance Actions
opensmi_client-1.0.0rc2.tar.gz 38.4 kB With provenance Details for opensmi_client-1.0.0rc2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for OpenSMI-Client 1.0.0rc2
File Interpreter ABI Platform Actions
opensmi_client-1.0.0rc2-py3-none-any.whl Python 3 none any Details for opensmi_client-1.0.0rc2-py3-none-any.whl

Total release size: 78.1 kB

Release files / opensmi_client-1.0.0rc2.tar.gz

Download URL opensmi_client-1.0.0rc2.tar.gz
Size 38.4 kB
Tags Source
SHA-256 checksum
How to use checksums
35a134d20de5c0cabbb9b4fb335052a32ee38f12a357c234664ad27d63ed0857
BLAKE2b-256 checksum
How to use checksums
124c29c266bb5305ef6bb77f8e3274aebb07ce10f86c162f2b98af0aa4f0f5fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / opensmi_client-1.0.0rc2-py3-none-any.whl

Download URL opensmi_client-1.0.0rc2-py3-none-any.whl
Size 39.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a77935cc7fc5f0da9dffca9f9fc094a33c5a19813fd3ab5af0bb88b3a76629e8
BLAKE2b-256 checksum
How to use checksums
c41caf337a47bc9121303140900d970215ada3e8db9edbc914086358cae1f5ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Security for OpenSMI-Client 1.0.0rc2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for opensmi_client-1.0.0rc2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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