Toloka documentation

create_project

toloka.client.TolokaClient.create_project | Source code

create_project(self, project: Project)

Creates a new project

Parameters Description

Parameters Type Description
project Project

New Project with setted parameters.

  • Returns:

    Created project. With read-only fields.

  • Return type:

    Project

Examples:

How to create a new project.

new_project = toloka.project.Project(
    assignments_issuing_type=toloka.project.Project.AssignmentsIssuingType.AUTOMATED,
    public_name='My best project',
    public_description='Describe the picture',
    public_instructions='Describe in a few words what is happening in the image.',
    task_spec=toloka.project.task_spec.TaskSpec(
        input_spec={'image': toloka.project.field_spec.UrlSpec()},
        output_spec={'result': toloka.project.field_spec.StringSpec()},
        view_spec=project_interface,
    ),
)
new_project = toloka_client.create_project(new_project)
print(new_project.id)