SchemaConditionV1

toloka.client.project.template_builder.conditions.SchemaConditionV1 | Source code

SchemaConditionV1(
self,
data: Optional[Any] = None,
schema: Optional[Dict] = None,
*,
hint: Optional[Any] = None,
version: Optional[str] = '1.0.0'
)

Allows validating data using JSON Schema. This is a special format for describing data in JSON format.

For example, you can describe the data type, the minimum and maximum values, and specify that all values must be unique.

This component is useful in the following cases:

* If available components don't provide everything you need to configure validation.
* If you already have a prepared JSON Schema configuration for the check and you want to use it.

Parameters Description

ParametersTypeDescription
dataOptional[Any]

Data that should be checked.

schemaOptional[Dict]

The schema for validating data.

hintOptional[Any]

Validation error message that a Toloker will see.

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