Get all the projects with a certain status created after a specified date.
Connect the Toloka-Kit library to your script.
import toloka.client as toloka
Replace the sample API key with your own one.
toloka_client = toloka.TolokaClient('PlaceYourRealApiKey_Here', 'PRODUCTION');
Iterate through all the projects with the ACTIVE
status created after October 1, 2022, calling the get_projects()
method.
from datetime import datetime
for project in toloka_client.get_projects(
status='ACTIVE',
created_gte=datetime(2022, 10, 1)):
print(project.id, project.public_name, project.created.date())
You should get an output with the project IDs, titles, and creation dates which looks like this.
119232 Image classification 2022-11-11120798 Cat or Dog? 2022-11-22123923 Product Search Relevance 2022-12-12124269 Verify a business in your city 2022-12-14126881 Elephant color 2022-12-29
from datetime import datetimeimport toloka.client as tolokatoloka_client = toloka.TolokaClient('PlaceYourRealApiKey_Here', 'PRODUCTION')for project in toloka_client.get_projects( status='ACTIVE', created_gte=datetime(2022, 10, 1)): print(project.id, project.public_name, project.created.date())
Last updated: February 7, 2023