class documentation

Runtime for Temporal Python SDK.

Users are encouraged to use default. It can be set with set_default. Every time a new runtime is created, a new internal thread pool is created.

Runtimes do not work across forks.

Static Method default Get the default runtime, creating if not already created.
Static Method set_default Set the default runtime to the given runtime.
Method __init__ Create a default runtime with the given telemetry config.
Property metric_meter Metric meter for this runtime. This is a no-op metric meter if no metrics were configured.
Instance Variable _core_runtime Undocumented
Instance Variable _metric_meter Undocumented

Get the default runtime, creating if not already created.

If the default runtime needs to be different, it should be done with set_default before this is called or ever used.

Returns
RuntimeThe default runtime.
@staticmethod
def set_default(runtime: Runtime, *, error_if_already_set: bool = True): (source)

Set the default runtime to the given runtime.

This should be called before any Temporal client is created, but can change the existing one. Any clients and workers created with the previous runtime will stay on that runtime.

Parameters
runtime:RuntimeThe runtime to set.
error_if_already_set:boolIf True and default is already set, this will raise a RuntimeError.
def __init__(self, *, telemetry: TelemetryConfig): (source)

Create a default runtime with the given telemetry config.

Each new runtime creates a new internal thread pool, so use sparingly.

Metric meter for this runtime. This is a no-op metric meter if no metrics were configured.

_core_runtime = (source)

Undocumented

_metric_meter = (source)

Undocumented