NeoRuntime Platform Python SDK Documentation

Welcome to the NeoRuntime Platform Python SDK! This is a Python development toolkit for the NeoRuntime Edge AI Computing Platform.

Version Python Version

Overview

The NeoRuntime Platform Python SDK provides clean APIs to access platform capabilities:

  • Video Stream Access: Raw and encoded video streams (zero-copy SHM)

  • AI Inference Service: Model registration, single-shot and streaming inference

  • Event Bus: Publish/subscribe pattern with wildcard topic support

  • Device Control: Light, PTZ, lens, and GPIO control

  • Plugin System: Plugin discovery and gRPC server hosting

Quick Start

Installation

git clone https://github.com/camthink-ai/neoruntime-sdks.git
cd neoruntime-sdks
python -m pip install -e ./python

Basic Usage

AI Inference

from neoruntime_ipc_sdk import InferenceClient
import numpy as np

# Create inference client
inf = InferenceClient()

# Single-shot inference
image = np.zeros((1080, 1920, 3), dtype=np.uint8)
result = inf.infer(image, model_id="person_v1")

print(f"Detected {len(result.objects)} objects")
for obj in result.objects:
    print(f"  - {obj.label}: {obj.score:.2f}")

Event Bus

from neoruntime_ipc_sdk import EventClient

events = EventClient()

# Publish event
events.publish("app/alert", {"type": "person_detected"})

# Subscribe to events (supports wildcards)
for event in events.subscribe("model/*/detections"):
    print(f"Received event: {event.topic}")

Device Control

from neoruntime_ipc_sdk import DeviceClient, IrCutMode

dev = DeviceClient()

# Light control
dev.set_white_light(80)
dev.set_ir_led(True)
dev.set_ircut(IrCutMode.NIGHT)

Contents

Indices and Tables