Skip to main content


TemplateNoRuntimeContext Objects

class TemplateNoRuntimeContext()

Context class that allows to use a template out of runtime. This is useful when needing to access a template's members without the magic passthroughs.

An example of a passthrough is self.param returning the parameter value instead of the actual Parameter object.

Template Objects

class Template()


def without_runtime() -> TemplateNoRuntimeContext

Returns the template without the runtime passthrough magic activated.


def info(cls) -> TemplateInfo

Returns general information about a given template.


def parse_parameters(
params: Dict[str,
JsonValue]) -> Result[Dict[str, Any], List[ValidationError]]

Given a string dict of parameter names and values, this function parses the dict and returns a same-shaped dict but with Python types instead of string representations. This is used to parse user inputs from the UI.


def get_parameters(cls) -> Dict[str, Parameter]

Get all parameter definitions of template.


def get_variables(cls) -> dict[str, Variable]

Get all variable definitions of template.


def get_connections(cls) -> dict[str, Connection]

Get all connection definitions of template.

RuntimeTemplate Objects

class RuntimeTemplate()

This class wraps a Template and a State together such that the template gets injected with the state. This is useful to pass the two around whilst avoiding errors such as

  • mixing different states
  • forgetting to inject the state into the template