flytekit.LiteralType

class flytekit.LiteralType(simple=None, schema=None, collection_type=None, map_value_type=None, blob=None, enum_type=None, structured_dataset_type=None, metadata=None)[source]

This is a oneof message, only one of the kwargs may be set, representing one of the Flyte types.

Parameters
  • simple (int) – Enum type from SimpleType

  • schema (SchemaType) – Type definition for a dataframe-like object.

  • collection_type (LiteralType) – For list-like objects, this is the type of each entry in the list.

  • map_value_type (LiteralType) – For map objects, this is the type of the value. The key must always be a string.

  • blob (flytekit.models.core.types.BlobType) – For blob objects, this describes the type.

  • enum_type (flytekit.models.core.types.EnumType) – For enum objects, describes an enum

  • structured_dataset_type (flytekit.models.core.types.StructuredDatasetType) – structured dataset

  • metadata (dict[Text, T]) – Additional data describing the type

Methods

classmethod from_flyte_idl(proto)[source]
Parameters

proto (flyteidl.core.types_pb2.LiteralType) –

Return type

LiteralType

short_string()
Return type

Text

to_flyte_idl()[source]
Return type

flyteidl.core.types_pb2.LiteralType

verbose_string()
Return type

Text

Attributes

blob
collection_type

The collection value type

enum_type
is_empty
map_value_type

The Value for a dictionary. Key is always string

metadata

dict[Text, T]

Type

rtype

schema
simple
structured_dataset_type