Archive project

Move the project which you no longer use into archive.

Steps to follow

1. Import Toloka-Kit

Connect the Toloka-Kit library to your script.

import toloka.client as toloka

2. Instantiate TolokaClient

Replace the sample API key with your own one.

toloka_client = toloka.
TolokaClient
('PlaceYourRealApiKey_Here', 'PRODUCTION');

3. Archive project

Find out the ID of the project which you want to archive. Then call the archive_project() method.

archived_project = toloka_client.
archive_project
('117493')

4. Print project ID and status

The archive_project() request will return the Project class object. You can use its attributes to print the information you need.

print(archived_project.id, archived_project.status)

You should get an output with the project ID and the updated status which looks like this.

117493 ProjectStatus.ARCHIVED

Complete code: Archive project

import toloka.client as toloka
toloka_client = toloka.TolokaClient('PlaceYourRealApiKey_Here', 'PRODUCTION')
archived_project = toloka_client.archive_project('117493')
print(archived_project.id, archived_project.status)
List of classes and methods used in this recipe

See also

Last updated: February 7, 2023

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