Skip to content

Use with AI

Use with AI

Python SDK ​

Use Python for typed robot status, data workflows and application development. The SDK connects to Robot Runtime over gRPC; RuntimeReadClient offers a compact entry point for reads and previews, while RuntimeClient exposes the complete Runtime operations.

Installation ​

On a prepared kit PC, first check the installed software. Clone the dev branch of the Quickstarts repository or open the delivered Python quickstart folder. Use Python 3.12, uv 0.13.7 or newer, Node.js 24 LTS and npm.

For the Git option:

powershell
git clone --branch dev --single-branch https://bitbucket.org/fruitcore/plexa-runtime-quickstarts.git

Then open the clone’s python/ folder or the delivered Python folder and run:

powershell
npm ci
uv sync --locked
npm run testkit

The Python folder contains SDK wheel 0.2.0, Testkit 0.5.1, examples and lockfiles. npm ci installs the Testkit; uv sync --locked prepares the Python environment with the SDK. Both commands use the configured package registries or your local cache for third-party dependencies.

First status read — local fixture ​

Keep the Testkit terminal running. In a second terminal in the same folder, run uv run --locked python examples/read_status.py. The example checks Runtime API 0.9.0 and requires HORST600_S5. The installed client reads status as follows:

python
from plexa_runtime_sdk import RuntimeReadClient

with RuntimeReadClient('127.0.0.1:19040', deadline_seconds=2.0) as runtime:
    robots = runtime.list_robots()
    if len(robots) != 1:
        raise RuntimeError('Expected one local fixture robot')
    robot = robots[0]
    print('Robot:', robot.name, 'model:', robot.model_id)
    print('Joints in degrees:', runtime.get_current_joints(robot.name))

Expect one fixture robot and six joint values. The context manager closes its gRPC channel. This loopback example returns test data; it does not connect to your physical robot. SDK-created insecure channels are restricted to loopback.

Continue with your application ​

Joint angles use degrees, Cartesian positions millimetres. Use the connection configuration supplied with your system and verify the expected robot identity.

Python API reference · Control API · Kit preparation