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 (flytekit.models.literals.Primitive) –

  • blob (flytekit.models.literals.Blob) –

  • binary (flytekit.models.literals.Binary) –

  • schema (flytekit.models.literals.Schema) –

  • union (flytekit.models.literals.Union) –

  • none_type (flytekit.models.literals.Void) –

  • error (flytekit.models.types.Error) –

  • generic (google.protobuf.struct_pb2.Struct) –

  • structured_dataset (flytekit.models.literals.StructuredDataset) –

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