types
AbsolutePathStr = Annotated[NonEmptyStr, AfterValidator(val_absolute_path), AfterValidator(val_no_dotdot_in_path), AfterValidator(val_os_path_normpath)]
module-attribute
¶
String representing an absolute path.
Validation fails if the path is not absolute or if it contains a parent-directory reference "/../".
AttributeFilters = Annotated[dict[str, list[ImageAttributeValue]], AfterValidator(validate_attribute_filters)]
module-attribute
¶
Image-attributes filters.
DictStrAny = Annotated[dict[str, Any], AfterValidator(valdict_keys)]
module-attribute
¶
Dictionary where keys are strings with no leading/trailing whitespaces.
DictStrStr = Annotated[dict[str, NonEmptyStr], AfterValidator(valdict_keys)]
module-attribute
¶
Dictionary where keys are strings with no leading/trailing whitespaces and values are non-empty strings.
HttpUrlStr = Annotated[NonEmptyStr, AfterValidator(val_http_url)]
module-attribute
¶
String representing an URL.
ImageAttributeValue = Union[int, float, str, bool]
module-attribute
¶
Possible values for image attributes.
ImageAttributes = Annotated[dict[str, ImageAttributeValue], AfterValidator(valdict_keys)]
module-attribute
¶
Image-attributes dictionary.
ImageAttributesWithNone = Annotated[dict[str, ImageAttributeValue | None], AfterValidator(valdict_keys)]
module-attribute
¶
Image-attributes dictionary, including None attributes.
ImageTypes = Annotated[dict[str, bool], AfterValidator(valdict_keys)]
module-attribute
¶
Image types.
ListUniqueAbsolutePathStr = Annotated[list[AbsolutePathStr], AfterValidator(val_unique_list)]
module-attribute
¶
List of unique absolute-path-string items.
ListUniqueNonEmptyString = Annotated[list[NonEmptyStr], AfterValidator(val_unique_list)]
module-attribute
¶
List of unique non-empty-string items.
ListUniqueNonNegativeInt = Annotated[list[NonNegativeInt], AfterValidator(val_unique_list)]
module-attribute
¶
List of unique non-negative-integer items.
NonEmptyStr = Annotated[str, StringConstraints(min_length=1, strip_whitespace=True)]
module-attribute
¶
A non-empty string, with no leading/trailing whitespaces.
SafeNonEmptyStr = Annotated[NonEmptyStr, StringConstraints(pattern='^([a-zA-Z0-9_. -]+)$')]
module-attribute
¶
A non-empty string restricted to the characters matching the regex, i.e. alphanumerics, underscores, dots, spaces, and hyphens, with no leading or trailing spaces.
SafeRelativePathStr = Annotated[NonEmptyStr, AfterValidator(val_no_dotdot_in_path), AfterValidator(val_os_path_normpath), AfterValidator(val_non_absolute_path), StringConstraints(pattern='^([a-zA-Z0-9_. /-]+)$')]
module-attribute
¶
String representing a relative path.
Validation fails if the path is absolute, if it contains a parent-directory reference "/../" or if it doesn't match the regex, i.e. if it contains characters which are not alphanumerics, underscores, dots, spaces, hyphens or slashes.
TypeFilters = Annotated[dict[str, bool], AfterValidator(valdict_keys)]
module-attribute
¶
Image-type filters.
WorkflowTaskArgument = Annotated[DictStrAny, AfterValidator(validate_wft_args)]
module-attribute
¶
Dictionary with no keys from a given forbid-list.
ZarrDirStr = Annotated[NonEmptyStr, AfterValidator(val_no_dotdot_in_path), AfterValidator(normalize_url)]
module-attribute
¶
String representing a zarr_dir path.
Validation fails if the path is not absolute or if it contains a parent-directory reference "/../".
ZarrUrlStr = Annotated[NonEmptyStr, AfterValidator(val_no_dotdot_in_path), AfterValidator(normalize_url)]
module-attribute
¶
String representing a zarr URL/path.
Validation fails if the path is not absolute or if it contains a parent-directory reference "/../".