package documentation

Temporal Nexus support

Warning

Nexus APIs are experimental and unstable.

See https://github.com/temporalio/sdk-python/tree/main#nexus

Module _decorators Undocumented
Module _link_conversion No module docstring; 0/1 variable, 0/7 constant, 7/9 functions documented
Module _operation_context No module docstring; 0/3 variable, 0/4 function, 2/2 classes documented
Module _operation_handlers No module docstring; 1/1 function, 1/1 class documented
Module _token Undocumented
Module _util No module docstring; 0/1 type variable, 5/6 functions documented

From __init__.py:

Class Info Information about the running Nexus operation.
Class LoggerAdapter Logger adapter that adds Nexus operation context information.
Class NexusCallback Nexus callback to attach to events such as workflow completion.
Class WorkflowHandle A handle to a workflow that is backing a Nexus operation.
Class WorkflowRunOperationContext Context received by a workflow run operation.
Function client Get the Temporal client used by the worker handling the current Nexus operation.
Function in_operation Whether the current code is inside a Nexus operation.
Function info Get the current Nexus operation information.
Function workflow_run_operation Decorator marking a method as the start method for a workflow-backed operation.
Variable logger Logger that emits additional data describing the current Nexus operation.

Get the Temporal client used by the worker handling the current Nexus operation.

def in_operation() -> bool: (source)

Whether the current code is inside a Nexus operation.

def info() -> Info: (source)

Get the current Nexus operation information.

@overload
def workflow_run_operation(start: Callable[[ServiceHandlerT, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]]]) -> Callable[[ServiceHandlerT, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]]]:
@overload
def workflow_run_operation(*, name: str | None = None) -> Callable[[Callable[[ServiceHandlerT, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]]]], Callable[[ServiceHandlerT, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]]]]:
(source)

Decorator marking a method as the start method for a workflow-backed operation.

Logger that emits additional data describing the current Nexus operation.