Gates
@ifelse Decorator
Signature
def ifelse(
when_true: str | type[END],
when_false: str | type[END],
*,
cache: bool = False,
hide: bool = False,
default_open: bool = True,
name: str | None = None,
rename_inputs: dict[str, str] | None = None,
emit: str | tuple[str, ...] | None = None,
wait_for: str | tuple[str, ...] | None = None,
) -> Callable[[Callable[..., bool]], IfElseNode]: ...Parameters
Parameter
Type
Default
Description
Return Value
Basic Usage
With END
Input Renaming
IfElseNode Class
Constructor
Properties
name: str
name: strinputs: tuple[str, ...]
inputs: tuple[str, ...]outputs: tuple[str, ...]
outputs: tuple[str, ...]targets: list[str | type[END]]
targets: list[str | type[END]]when_true: str | type[END]
when_true: str | type[END]when_false: str | type[END]
when_false: str | type[END]descriptions: dict[bool, str]
descriptions: dict[bool, str]cache: bool
cache: boolfunc: Callable
func: Callableis_async: bool
is_async: boolis_generator: bool
is_generator: booldefinition_hash: str
definition_hash: strMethods
has_default_for(param: str) -> bool
has_default_for(param: str) -> boolget_default_for(param: str) -> Any
get_default_for(param: str) -> Anywith_name(name: str) -> IfElseNode
with_name(name: str) -> IfElseNodewith_inputs(mapping=None, /, **kwargs) -> IfElseNode
with_inputs(mapping=None, /, **kwargs) -> IfElseNode__call__(*args, **kwargs) -> bool
__call__(*args, **kwargs) -> bool__repr__() -> str
__repr__() -> str@route Decorator
Signature
Parameters
Parameter
Type
Default
Description
Return Value
Basic Usage
With Descriptions
With Fallback
Multi-Target Mode
RouteNode Class
Constructor
Properties
name: str
name: strinputs: tuple[str, ...]
inputs: tuple[str, ...]outputs: tuple[str, ...]
outputs: tuple[str, ...]targets: list[str | type[END]]
targets: list[str | type[END]]descriptions: dict[str | type[END], str]
descriptions: dict[str | type[END], str]fallback: str | type[END] | None
fallback: str | type[END] | Nonemulti_target: bool
multi_target: boolcache: bool
cache: boolfunc: Callable
func: Callableis_async: bool
is_async: boolis_generator: bool
is_generator: booldefinition_hash: str
definition_hash: strMethods
has_default_for(param: str) -> bool
has_default_for(param: str) -> boolget_default_for(param: str) -> Any
get_default_for(param: str) -> Anywith_name(name: str) -> RouteNode
with_name(name: str) -> RouteNodewith_inputs(mapping=None, /, **kwargs) -> RouteNode
with_inputs(mapping=None, /, **kwargs) -> RouteNode__call__(*args, **kwargs)
__call__(*args, **kwargs)__repr__() -> str
__repr__() -> strEND Sentinel
Usage
Properties
Checking for END
GateNode Base Class
Attributes
Validation Errors
At Decoration Time
At Graph Build Time
At Runtime
Complete Example
Last updated