flytekit.Scalar#

class flytekit.Scalar(primitive=None, blob=None, binary=None, schema=None, union=None, none_type=None, error=None, generic=None, structured_dataset=None)[source]#

Methods

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)

classmethod from_flyte_idl(pb2_object)[source]#
Parameters:

pb2_object (flyteidl.core.literals_pb2.Scalar)

Return type:

flytekit.models.literals.Scalar

serialize_to_string()#
Return type:

str

short_string()#
Return type:

Text

to_flyte_idl()[source]#
Return type:

flyteidl.core.literals_pb2.Scalar

verbose_string()#
Return type:

Text

Attributes

binary

Binary

Type:

rtype

blob

Blob

Type:

rtype

error

Error

Type:

rtype

generic

google.protobuf.struct_pb2.Struct

Type:

rtype

is_empty
none_type

Void

Type:

rtype

primitive

Primitive

Type:

rtype

schema

Schema

Type:

rtype

structured_dataset
union

Union

Type:

rtype

value

Returns whichever value is set :rtype: T