find_projects
toloka.client.TolokaClient.find_projects
Finds all projects that match certain rules
As a result, it returns an object that contains the first part of the found projects and whether there are any more results. It is better to use the "get_projects" method, they allow to iterate trought all results and not just the first output.
Parameters Description
Parameters | Type | Description |
---|---|---|
status |
Optional[Project.ProjectStatus] | Status of the project, from Project.ProjectStatus:
|
id_lt |
Optional[str] | Projects with an ID less than the specified value. |
id_lte |
Optional[str] | Projects with an ID less than or equal to the specified value. |
id_gt |
Optional[str] | Projects with an ID greater than the specified value. |
id_gte |
Optional[str] | Projects with an ID greater than or equal to the specified value. |
created_lt |
Optional[datetime] | Projects created before the specified date. |
created_lte |
Optional[datetime] | Projects created before or on the specified date. |
created_gt |
Optional[datetime] | Projects created after the specified date. |
created_gte |
Optional[datetime] | Projects created after or on the specified date. |
sort |
Union[List[str], ProjectSortItems, None] | How to sort result. Defaults to None. |
limit |
Optional[int] | Limit on the number of results returned. The maximum is 300. Defaults to None, in which case it returns first 20 results. |
-
Returns:
The first
limit
projects initems
. And a mark that there is more. -
Return type:
Examples:
Find projects that were created before a specific date.
toloka_client.find_projects(created_lt='2021-06-01T00:00:00')
If method finds more objects than custom or system limit
allows to operate, it will also show an indicator has_more=True
.