Common Flyte IDL objects#

class flytekit.AuthRole(assumable_iam_role=None, kubernetes_service_account=None)#
property assumable_iam_role#

The IAM role to execute the workflow with :rtype: Text

classmethod from_flyte_idl(pb2_object)#
Parameters:

pb2_object (flyteidl.admin.launch_plan_pb2.Auth)

Return type:

Auth

property kubernetes_service_account#

The kubernetes service account to execute the workflow with :rtype: Text

to_flyte_idl()#
Return type:

flyteidl.admin.launch_plan_pb2.Auth

class flytekit.Labels(values)#
classmethod from_flyte_idl(pb2_object)#
Parameters:

pb2_object (flyteidl.admin.common_pb2.Labels)

Return type:

Labels

to_flyte_idl()#
Return type:

dict[Text, Text]

class flytekit.Annotations(values)#
classmethod from_flyte_idl(pb2_object)#
Parameters:

pb2_object (flyteidl.admin.common_pb2.Annotations)

Return type:

Annotations

to_flyte_idl()#
Return type:

_common_pb2.Annotations

class flytekit.WorkflowExecutionPhase#

This class holds enum values used for setting notifications. See flytekit.Email for sample usage.

classmethod enum_to_string(int_value)#
Parameters:

int_value

Return type:

Text

class flytekit.Blob(metadata, uri)#
classmethod from_flyte_idl(proto)#
Parameters:

proto (flyteidl.core.literals_pb2.Blob)

Return type:

Blob

property metadata#
Return type:

BlobMetadata

to_flyte_idl()#
Return type:

flyteidl.core.literals_pb2.Blob

property uri#
Return type:

Text

class flytekit.BlobMetadata(type)#

This is metadata for the Blob literal.

classmethod from_flyte_idl(proto)#
Parameters:

proto (flyteidl.core.literals_pb2.BlobMetadata)

Return type:

BlobMetadata

to_flyte_idl()#
Return type:

flyteidl.core.literals_pb2.BlobMetadata

property type#
Return type:

flytekit.models.core.types.BlobType

class flytekit.Literal(scalar=None, collection=None, map=None, hash=None, metadata=None, offloaded_metadata=None)#
Parameters:
  • scalar (Scalar | None)

  • collection (LiteralCollection | None)

  • map (LiteralMap | None)

  • hash (str | None)

  • metadata (Dict[str, str] | None)

  • offloaded_metadata (LiteralOffloadedMetadata | None)

property collection#

If not None, this value holds a collection of Literal values which can be further unpacked. :rtype: LiteralCollection

classmethod from_flyte_idl(pb2_object)#
Parameters:

pb2_object (flyteidl.core.literals_pb2.Literal)

Return type:

Literal

property hash#

If not None, this value holds a hash that represents the literal for caching purposes. :rtype: str

property map#

If not None, this value holds a map of Literal values which can be further unpacked. :rtype: LiteralMap

property metadata: Dict[str, str] | None#

This value holds metadata about the literal.

property offloaded_metadata: LiteralOffloadedMetadata | None#

This value holds metadata about the offloaded literal.

property scalar#

If not None, this value holds a scalar value which can be further unpacked. :rtype: Scalar

set_metadata(metadata)#

Note: This is a mutation on the literal :param Dict[str, str] metadata: Metadata to be added

Parameters:

metadata (Dict[str, str])

to_flyte_idl()#
Return type:

flyteidl.core.literals_pb2.Literal

property value#

Returns one of the scalar, collection, or map properties based on which one is set. :rtype: T

class flytekit.Scalar(primitive=None, blob=None, binary=None, schema=None, union=None, none_type=None, error=None, generic=None, structured_dataset=None)#
Parameters:
  • primitive (Primitive | None)

  • blob (Blob | None)

  • binary (Binary | None)

  • schema (Schema | None)

  • union (Union | None)

  • none_type (Void | None)

  • error (Error | None)

  • generic (Struct | None)

  • structured_dataset (StructuredDataset | None)

property binary#
Return type:

Binary

property blob#
Return type:

Blob

property error#
Return type:

Error

classmethod from_flyte_idl(pb2_object)#
Parameters:

pb2_object (flyteidl.core.literals_pb2.Scalar)

Return type:

flytekit.models.literals.Scalar

property generic#
Return type:

google.protobuf.struct_pb2.Struct

property none_type#
Return type:

Void

property primitive#
Return type:

Primitive

property schema#
Return type:

Schema

to_flyte_idl()#
Return type:

flyteidl.core.literals_pb2.Scalar

property union#
Return type:

Union

property value#

Returns whichever value is set :rtype: T

class flytekit.LiteralType(simple=None, schema=None, collection_type=None, map_value_type=None, blob=None, enum_type=None, union_type=None, structured_dataset_type=None, metadata=None, structure=None, annotation=None)#
property annotation: TypeAnnotation#
Return type:

flytekit.models.annotation.TypeAnnotation

property collection_type: LiteralType#

The collection value type

classmethod from_flyte_idl(proto)#
Parameters:

proto (flyteidl.core.types_pb2.LiteralType)

Return type:

LiteralType

property map_value_type: LiteralType#

The Value for a dictionary. Key is always string

property metadata#
Return type:

dict[Text, T]

to_flyte_idl()#
Return type:

flyteidl.core.types_pb2.LiteralType

class flytekit.BlobType(format, dimensionality)#

This type represents offloaded data and is typically used for things like files.

property dimensionality#

An integer from BlobType.BlobDimensionality enum :rtype: int

property format#

A string describing the format of the underlying blob data. :rtype: Text

classmethod from_flyte_idl(proto)#
Parameters:

proto (flyteidl.core.types_pb2.BlobType)

Return type:

BlobType

to_flyte_idl()#
Return type:

flyteidl.core.types_pb2.BlobType