FieldSpec

toloka.client.project.field_spec.FieldSpec | Source code

FieldSpec(
self,
*,
required: Optional[bool] = True,
hidden: Optional[bool] = False
)

A base class for field specifications used in project's input_spec and output_spec for input and response data validation.

Use subclasses of this class to define the data type and set constraints such as maximum string length.

Parameters description

ParametersTypeDescription
requiredOptional[bool]

Whether a field is required.

Default value: True.

hiddenOptional[bool]

Whether to hide an input field from Tolokers. Output fields can't be hidden.

Default value: False.

Last updated: August 28, 2023

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