flytekit.Scalar

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

Scalar wrapper around Flyte types. Only one can be specified.

Parameters
  • primitive (Primitive) –

  • blob (Blob) –

  • binary (Binary) –

  • schema (Schema) –

  • none_type (Void) –

  • error

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

  • structured_dataset (StructuredDataset) –

Methods

classmethod from_flyte_idl(pb2_object)[source]
Parameters

pb2_object (flyteidl.core.literals_pb2.Scalar) –

Return type

flytekit.models.literals.Scalar

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

TODO

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
value

Returns whichever value is set :rtype: T