create_pool

toloka.client.TolokaClient.create_pool | Source code

create_pool(self, pool: Pool)

Creates a new pool in Toloka.

You can send a maximum of 20 requests of this kind per minute and 100 requests per day.

Parameters Description

ParametersTypeDescription
poolPool

The pool to be created.

  • Returns:

    The pool with updated read-only fields.

  • Return type:

    Pool

Examples:

Creating a new pool.

new_pool = toloka.client.Pool(
project_id='1',
private_name='Pool 1',
may_contain_adult_content=False,
will_expire=datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(days=365),
reward_per_assignment=0.01,
assignment_max_duration_seconds=60*20,
defaults=toloka.client.Pool.Defaults(default_overlap_for_new_task_suites=3),
filter=toloka.client.filter.Languages.in_('EN'),
)
new_pool.set_mixer_config(real_tasks_count=10, golden_tasks_count=0, training_tasks_count=0)
new_pool.quality_control.add_action(...)
new_pool = toloka_client.create_pool(new_pool)
print(new_pool.id)
Toloka-Kit
OverviewGetting OAuth tokenQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming