create_app_batch

toloka.client.TolokaClient.create_app_batch | Source code

Creates a batch with task items in an App project in Toloka.

Parameters description

ParametersTypeDescription
app_project_idstr

The ID of the project.

nameOptional[str]

The batch name.

itemsOptional[List[Dict[str, Any]]]

A list with task items. The items must follow the solution schema described in the App.input_spec.

  • Returns:

    Created batch with updated parameters.

  • Return type:

    AppBatch

Examples:

The following example is suitable for a project that requires query and website_url keys to be present in input data.

new_items = [
{'id':'30', 'query':'toloka kit', 'website_url':'https://toloka.ai/docs/toloka-kit'},
{'id':'31', 'query':'crowd kit', 'website_url':'https://toloka.ai/docs/crowd-kit'}
]
toloka_client.create_app_batch(
app_project_id='Q2d15QBjpwWuDz8Z321g',
items=new_items
)

Last updated: August 28, 2023

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