prefect.types

Functions

check_variable_value

check_variable_value(value: object) -> object

cast_none_to_empty_dict

cast_none_to_empty_dict(value: Any) -> dict[str, Any]

validate_set_T_from_delim_string

validate_set_T_from_delim_string(value: Union[str, T, set[T], None], type_: Any, delim: str | None = None) -> set[T]

“no-info” before validator useful in scooping env vars

e.g. PREFECT_CLIENT_RETRY_EXTRA_CODES=429,502,503 -> {429, 502, 503} e.g. PREFECT_CLIENT_RETRY_EXTRA_CODES=429 -> {429}

parse_retry_delay_input

parse_retry_delay_input(value: Any) -> Any

Parses various inputs (string, int, float, list) into a format suitable for TaskRetryDelaySeconds (int, float, list[float], or None). Handles comma-separated strings for lists of delays.

convert_none_to_empty_dict

convert_none_to_empty_dict(v: Optional[KeyValueLabels]) -> KeyValueLabels

Classes

SecretDict