flytekit.Literal#
- class flytekit.Literal(scalar=None, collection=None, map=None, hash=None)[source]#
This IDL message represents a literal value in the Flyte ecosystem.
Methods
- classmethod from_flyte_idl(pb2_object)[source]#
- Parameters
pb2_object (flyteidl.core.literals_pb2.Literal) –
- Return type
- short_string()#
- Return type
Text
- verbose_string()#
- Return type
Text
Attributes
- collection
If not None, this value holds a collection of Literal values which can be further unpacked. :rtype: LiteralCollection
- hash
If not None, this value holds a hash that represents the literal for caching purposes. :rtype: str
- is_empty
- map
If not None, this value holds a map of Literal values which can be further unpacked. :rtype: LiteralMap
- scalar
If not None, this value holds a scalar value which can be further unpacked. :rtype: Scalar
- value
Returns one of the scalar, collection, or map properties based on which one is set. :rtype: T