flytekit.Literal#
- class flytekit.Literal(scalar=None, collection=None, map=None, hash=None, metadata=None, offloaded_metadata=None)[source]#
Methods
- Parameters:
- classmethod from_flyte_idl(pb2_object)[source]#
- Parameters:
pb2_object (flyteidl.core.literals_pb2.Literal)
- Return type:
- set_metadata(metadata)[source]#
Note: This is a mutation on the literal :param Dict[str, str] metadata: Metadata to be added
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
- metadata
This value holds metadata about the literal.
- offloaded_metadata
This value holds metadata about the offloaded literal.
- 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