Skip to main content

PathRewrite

Configuration for rewriting paths during input loading.

Attributes

AttributeTypeDescription
old_prefixstrIf set, rewrites any path starting with this prefix to the new prefix.
new_prefixstrIf set, rewrites any path starting with this prefix to the new prefix.

Methods


from_str()

@classmethod
def from_str(
pattern: str
) - > [PathRewrite](pathrewrite.md?sid=flyte_models_pathrewrite)

Create a PathRewrite from a string pattern of the form old_prefix- >new_prefix.

Parameters

NameTypeDescription
patternstrThe string pattern representing the path rewrite, expected in the format 'old_prefix- >new_prefix'.

Returns

TypeDescription
[PathRewrite](pathrewrite.md?sid=flyte_models_pathrewrite)A new PathRewrite instance configured with the parsed old and new prefixes.