StringSpec

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

StringSpec(
self,
*,
required: Optional[bool] = True,
hidden: Optional[bool] = False,
min_length: Optional[int] = None,
max_length: Optional[int] = None,
allowed_values: Optional[List[str]] = None
)

A string field specification.

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.

min_lengthOptional[int]

The minimum length of the string.

max_lengthOptional[int]

The maximum length of the string.

allowed_valuesOptional[List[str]]

A list of allowed values.

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