1.15.4.dev2+g3e3ce2426

flytekit.models.annotation

Directory

Classes

Class Description
Any Special type indicating an unconstrained type.
TypeAnnotation Python class representation of the flyteidl TypeAnnotation message.

flytekit.models.annotation.Any

Special type indicating an unconstrained type.

  • Any is compatible with every type.
  • Any assumed to have all methods.
  • All values assumed to be instances of Any.

Note that all the above statements are true from the point of view of static type checkers. At runtime, Any should not be used with instance checks.

flytekit.models.annotation.TypeAnnotation

Python class representation of the flyteidl TypeAnnotation message.

def TypeAnnotation(
    annotations: typing.Dict[str, typing.Any],
):
Parameter Type
annotations typing.Dict[str, typing.Any]

Methods

Method Description
from_flyte_idl()
merge_annotations() Merges two annotations together
to_flyte_idl()

from_flyte_idl()

def from_flyte_idl(
    proto,
):
Parameter Type
proto

merge_annotations()

def merge_annotations(
    annotation: TypeAnnotation,
    other_annotation: TypeAnnotation,
):

Merges two annotations together. If the same key exists in both annotations, the value in the other annotation will be used.

Parameter Type
annotation TypeAnnotation
other_annotation TypeAnnotation

to_flyte_idl()

def to_flyte_idl()

Properties

Property Type Description
annotations