SetBuilder
set_
¶
set_(*target: Retriever | int) -> SetBuilder
Set this value using another value
Parameters:
-
*target(Retriever | int, default:()) –The retriever path to set the value at. This can be a sequence of retrievers/list indices starting in the current struct
Returns:
-
SetBuilder–A
SetBuilderinstance to continue defining additional combinator properties
SetBuilder
¶
Constructs combinators to set retriever values
by
¶
by(from_: Get) -> Combinator
Set the previously selected value to the result after performing the manipulations from the provided Get
instance
Parameters:
-
*from_(Get) –The
Getinstance that encodes the manipulations to perform
Returns:
-
Combinator–A combinator that encodes the setter logic defined by the
SetBuilderchain
from_
¶
from_(*source: Retriever | int) -> Combinator
Set the previously selected value to the value of this retriever
Parameters:
-
*source(Retriever | int, default:()) –The retriever path to fetch the value from. This can be a sequence of retrievers/list indices starting in the current struct
Returns:
-
Combinator–A combinator that encodes the setter logic defined by the
SetBuilderchain
from_key
¶
from_key(key: str) -> Combinator
Set the previously selected value to the value of this context key
Parameters:
-
key(str) –The context key to set from
Returns:
-
Combinator–A combinator that encodes the setter logic defined by the
SetBuilderchain
from_len
¶
from_len(*source: Retriever | int) -> Combinator
Set the previously selected value to the length of this value if it is a list
Parameters:
-
*source(Retriever | int, default:()) –The retriever path to fetch the value from. This can be a sequence of retrievers/list indices starting in the current struct
Returns:
-
Combinator–A combinator that encodes the setter logic defined by the
SetBuilderchain
Raises:
-
ValueError–if the source value is not a list
to
¶
to(val: Any) -> Combinator
Set the previously selected value to this literal value
Parameters:
-
val(Any) –The literal value
Returns:
-
Combinator–A combinator that encodes the setter logic defined by the
SetBuilderchain