मुख्य सामग्री पर जाएँ

raygeo.driver.octoprint

OctoPrint server support implemented in Rust. OctoPrintDriver submits G-code jobs over the server's REST API and tracks printer state via its SockJS WebSocket (with REST polling fallback).

OctoPrintDriver​

An OctoPrint server session: job submission and live printer state over the REST API and SockJS WebSocket.

All async methods return asyncio futures; a typed DriverEvent is delivered to event_callback(event) on the event loop thread. Operations the OctoPrint API cannot perform (e.g. writing firmware settings) raise NotImplementedError.

move_to_absolute()​

move_to_absolute(
x: float,
y: float,
z: Optional[float] = None,
speed: Optional[float] = None,
) -> Awaitable[None]

Move to an absolute position through the printhead jog API. Without a speed the server uses its configured default.

ParameterTypeDescription
xfloat
yfloat
zOptional[float] = None
speedOptional[float] = None
ReturnsAwaitable[None]

probe_device()​

probe_device() -> Awaitable[probe.OctoPrintDeviceInfo]

Run the device census over the session: the parsed /api/version and /api/printer responses, interpreted into the structured census dict. Local and remote sessions probe identically.

ParameterTypeDescription
ReturnsAwaitable[probe.OctoPrintDeviceInfo]

probe_info()​

probe_info() -> Awaitable[list[dict[str, object]]]

Fetch the census payloads (the parsed /api/version and /api/printer responses) over the session, so local and remote probing use the same code path.

ParameterTypeDescription
ReturnsAwaitable[list[dict[str, object]]]