autocast_to_enum

toloka.client.primitives.base.autocast_to_enum | Source code

autocast_to_enum(func: Callable)

Function decorator that performs str -> Enum conversion when decorated function is called

This decorator modifies function so that every argument annotated with any subclass of Enum type (including Enum itself) can be passed a value of str (or any )

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