Toloka documentation

TemplateBuilderViewSpec

toloka.client.project.view_spec.TemplateBuilderViewSpec | Source code

TemplateBuilderViewSpec(
    self,
    *,
    settings: Optional[ViewSpec.Settings] = None,
    view: Optional[BaseComponent] = None,
    plugins: Optional[List[BaseComponent]] = None,
    vars: Optional[Dict[str, Any]] = None,
    core_version: Optional[str] = '1.0.0'
)

A template builder view scpecification that defines an interface with

template builder components

Parameters Description

Parameters Type Description
view -

plugins -

vars -

core_version Optional[str]

Default template components version. Most users will not need to change this parameter.

Examples:

How to declare simple interface:

import toloka.client.project.template_builder as tb
project_interface = toloka.project.view_spec.TemplateBuilderViewSpec(
    view=tb.view.ListViewV1(
        items=[header, output_field, radiobuttons],
        validation=some_validation,
    ),
    plugins=[plugin1, plugin2]
)