temporalio.plugin.SimplePlugin

Create a simple plugin with configurable parameters. Each of the parameters will be applied to any
component for which they are applicable. All arguments are optional, and all but run_context can also be callables for more complex modification. See the type PluginParameter above. For details on each argument, see below.
Parameters
name:strThe name of the plugin.
data_converter:PluginParameter[temporalio.converter.DataConverter]Data converter for serialization, or callable to customize existing one. Applied to the Client and Replayer.
interceptors:Sequence[temporalio.client.Interceptor | temporalio.worker.Interceptor] | NoneInterceptors to append. Client interceptors are applied to the Client, worker interceptors are applied to the Worker and Replayer. Interceptors that implement both interfaces will be applied to both, with exactly one instance used per worker to avoid duplication.
activities:PluginParameter[Sequence[Callable]]Activity functions to append, or callable to customize existing ones. Applied to the Worker.
nexus_service_handlers:PluginParameter[Sequence[Any]]Nexus service handlers to append, or callable to customize existing ones. Applied to the Worker.
workflows:PluginParameter[Sequence[type]]Workflow classes to append, or callable to customize existing ones. Applied to the Worker and Replayer.
workflow_runner:PluginParameter[WorkflowRunner]Workflow runner, or callable to customize existing one. Applied to the Worker and Replayer.
workflow_failure_exception_types:PluginParameter[Sequence[type[BaseException]]]Exception types for workflow failures to append, or callable to customize existing ones. Applied to the Worker and Replayer.
run_context:Callable[[], AbstractAsyncContextManager[None]] | NoneA place to run custom code to wrap around the Worker (or Replayer) execution. Specifically, it's an async context manager producer. Applied to the Worker and Replayer.
Returns
A configured Plugin instance.