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', infer_data_spec: Optional[bool] = False)
A task interface defined with the TemplateBuilder.
See also Template Builder in the guide.
Parameters | Type | Description |
---|---|---|
view | - | A top level component like SideBySideLayoutV1. |
plugins | - | An array of plugins. |
vars | - | Reusable data. It is referenced with the RefComponent. |
core_version | Optional[str] | The default template components version. Most likely, you do not need to change this parameter. |
infer_data_spec | Optional[bool] |
|
Examples:
Creating a simple interface based on ListViewV1:
import toloka.client.project.template_builder as tbproject_interface = toloka.client.project.view_spec.TemplateBuilderViewSpec( view=tb.view.ListViewV1( items=[header, output_field, radiobuttons], validation=some_validation, ), plugins=[plugin1, plugin2])# add 'project_interface' to 'toloka.project.Project' instance
Last updated: August 28, 2023