ReasonersClientSync
ReasonersClientSync( gateway: ReasonersGatewaySync, *, config: "Config | None" = None)Synchronous reasoners client (public API for connect_sync()).
Methods
Section titled “Methods”.close()
Section titled “.close()”ReasonersClientSync.close() -> NoneClose the client (no-op).
Note: gateways do not own shared transports; the root platform client is responsible for closing transports/sessions.
Returns:
None- Always returnsNone.
.list()
Section titled “.list()”ReasonersClientSync.list( *, state: str | None = None, reasoner_name: str | None = None, reasoner_type: str | None = None, reasoner_size: str | None = None, created_by: str | None = None) -> list[Reasoner]List reasoners, optionally filtering by attributes.
Returns:
list[Reasoner] - Matching reasoners.
.get()
Section titled “.get()”ReasonersClientSync.get(reasoner_type: str, reasoner_name: str) -> Reasoner | NoneGet a reasoner by (type, name), returning None if not found.
Returns:
Reasoner|None- The reasoner, orNoneif not found.
.create()
Section titled “.create()”ReasonersClientSync.create( reasoner_type: str, reasoner_name: str | None = None, *, reasoner_size: str | None = None, auto_suspend_mins: int | None = None, settings: dict[str, Any] | None = None) -> ReasonerOperationSyncCreate a reasoner and return an operation handle (non-blocking).
Returns:
ReasonerOperationSync- An operation handle; callop.wait(...)to block for readiness.
.delete()
Section titled “.delete()”ReasonersClientSync.delete(reasoner_type: str, reasoner_name: str | None = None) -> NoneDelete a reasoner.
Args: reasoner_type: Reasoner type (Logic, Prescriptive, Predictive). reasoner_name: Optional name (defaults to config/user-derived).
Returns:
None- Always returnsNone.
.suspend()
Section titled “.suspend()”ReasonersClientSync.suspend(reasoner_type: str, reasoner_name: str | None = None) -> NoneSuspend a reasoner.
Returns:
None- Always returnsNone.
.resume()
Section titled “.resume()”ReasonersClientSync.resume( reasoner_type: str, reasoner_name: str | None = None) -> ReasonerOperationSyncResume a reasoner and return an operation handle (non-blocking).
Returns:
ReasonerOperationSync- An operation handle; callop.wait(...)to block for readiness.
.ensure()
Section titled “.ensure()”ReasonersClientSync.ensure( reasoner_type: str, reasoner_name: str | None = None, *, reasoner_size: str | None = None, auto_suspend_mins: int | None = None, settings: dict[str, Any] | None = None, create: bool = True, resume: bool = True) -> ReasonerOperationSyncEnsure a reasoner exists and is READY, returning an operation handle (non-blocking).
- If missing and
create=True, creates it. - If SUSPENDED and
resume=True, resumes it. - Otherwise returns an operation handle derived from reasoner state.
Returns:
ReasonerOperationSync- An operation handle representing the ensure workflow.
.create_ready()
Section titled “.create_ready()”ReasonersClientSync.create_ready( reasoner_type: str, reasoner_name: str | None = None, *, reasoner_size: str | None = None, auto_suspend_mins: int | None = None, settings: dict[str, Any] | None = None, timeout_s: int = 900) -> ReasonerCreate a reasoner and block until it is READY.
Returns:
Reasoner- The created reasoner in READY state.
.resume_ready()
Section titled “.resume_ready()”ReasonersClientSync.resume_ready( reasoner_type: str, reasoner_name: str | None = None, *, timeout_s: int = 900) -> ReasonerResume a reasoner and block until it is READY.
Returns:
Reasoner- The reasoner in READY state.
.ensure_ready()
Section titled “.ensure_ready()”ReasonersClientSync.ensure_ready( reasoner_type: str, reasoner_name: str | None = None, *, reasoner_size: str | None = None, auto_suspend_mins: int | None = None, settings: dict[str, Any] | None = None, create: bool = True, resume: bool = True, timeout_s: int = 900) -> ReasonerEnsure a reasoner exists and is READY, blocking until completion.
Returns:
Reasoner- The reasoner in READY state.
.wait_until_ready()
Section titled “.wait_until_ready()”ReasonersClientSync.wait_until_ready( reasoner_type: str, reasoner_name: str, *, timeout_s: int = 900) -> ReasonerPoll until the reasoner is READY (or raise on timeout/not-found).
Returns:
Reasoner- The reasoner in READY state.
.sizes()
Section titled “.sizes()”ReasonersClientSync.sizes() -> list[str]Return supported reasoner sizes for the configured backend.
Returns:
list[str] - Allowed size identifiers.
.validate_size()
Section titled “.validate_size()”ReasonersClientSync.validate_size(size: str | None) -> tuple[bool, list[str]]Validate a size, returning (is_valid, allowed_sizes).
Returns:
tuple[bool,list[str]] - A(is_valid, allowed_sizes)pair.
.get_operation()
Section titled “.get_operation()”ReasonersClientSync.get_operation(operation_id: str) -> OperationFetch an operation by id.
Returns:
Operation- The operation status.
.wait_for_operation()
Section titled “.wait_for_operation()”ReasonersClientSync.wait_for_operation(operation_id: str, *, timeout_s: int = 900) -> OperationBlock until an operation completes (or fails on timeout).
Returns:
Operation- The final operation status.