Runtime client API#
.. py:class:: RuntimeClient(base_url: str, *, timeout: float = 120.0, transport: ~modacor.client.transport.RuntimeTransport | None = None) :module: modacor.client :canonical: modacor.client.runtime.RuntimeClient
Small synchronous façade over the MoDaCor runtime HTTP API.
.. py:class:: SessionClient(runtime: RuntimeClient, session_id: str, detail: dict[str, Any] | None = None) :module: modacor.client :canonical: modacor.client.session.SessionClient
Operations scoped to one runtime session.
.. py:class:: SourceBufferClient(session: SessionClient, ref: str) :module: modacor.client :canonical: modacor.client.buffer.SourceBufferClient
Array and metadata uploads for one runtime source buffer.
.. py:class:: SinkBufferClient(session: SessionClient, ref: str) :module: modacor.client :canonical: modacor.client.buffer.SinkBufferClient
Array downloads for one runtime sink buffer.
.. py:class:: ChunkedOutputsClient(runtime: RuntimeClient) :module: modacor.client :canonical: modacor.client.chunked.ChunkedOutputsClient
Create and reopen server-owned chunked output resources.
.. py:class:: ChunkedOutputHandle(runtime: RuntimeClient, creation: dict[str, Any], plan_hash: str | None = None, provisional: bool = False) :module: modacor.client :canonical: modacor.client.chunked.ChunkedOutputHandle
Client-side handle for one server-owned chunked output lifecycle.
.. py:method:: ChunkedOutputHandle.chunk(spec: ~typing.Any) -> dict[str, ~typing.Any] :module: modacor.client
Build a process payload for a complete or provisional chunk.
.. py:class:: LocalRuntimeServer(*, host: str = ‘127.0.0.1’, port: int = 8000, log_path: str | ~pathlib.Path | None = None, environment: ~collections.abc.Mapping[str, str] | None = None, read_roots: ~collections.abc.Sequence[str | ~pathlib.Path] = (), write_roots: ~collections.abc.Sequence[str | ~pathlib.Path] = (), runtime_policy: str = ‘trusted’, startup_timeout: float = 45.0, shutdown_timeout: float = 10.0, request_timeout: float = 120.0, executable: str | ~pathlib.Path | None = None, max_sessions: int | None = None, max_pipeline_yaml_bytes: int | None = None, max_expanded_pipeline_steps: int | None = None, max_buffer_upload_bytes: int | None = None) :module: modacor.client :canonical: modacor.client.local_server.LocalRuntimeServer
Manage a notebook-local runtime process without owning external servers.
.. py:class:: RuntimeAPIError(*, status: int | None, code: str | None, message: str, details: ~typing.Any = None, endpoint: str, method: str) :module: modacor.client :canonical: modacor.client.errors.RuntimeAPIError
A structured runtime-service or transport failure.