Entries2ObjectHelperV1

toloka.client.project.template_builder.helpers.Entries2ObjectHelperV1 | Source code

Entries2ObjectHelperV1(
self,
entries: Optional[Union[BaseComponent, List[Union[BaseComponent, Entry]]]] = None,
*,
version: Optional[str] = '1.0.0'
)

Creating an object from a specified array of key-value pairs.

For example, let's say you have an array like this:

[
{
"key": "foo",
"value": "hello"
},
{
"key": "bar",
"value": "world"
}
]

It is converted to an object whose elements consist of the values of the original array: { "foo": "hello", "bar": "world" }

Parameters Description

ParametersTypeDescription
entriesOptional[Union[BaseComponent, List[Union[BaseComponent, Entry]]]]

Source array of key-value pairs.

Toloka-Kit
OverviewGetting OAuth tokenQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming