futures
¶
String
module-attribute
¶
String = Union[StringFuture, str]
String is a type alias for StringFuture or str.
CallFuture
¶
CallFuture(
func: Callable[..., R],
*args: Any,
executor_type: ExecutorType = ExecutorType.GENERAL_THREAD_POOL,
lazy_eval: bool = False,
**kwargs: Any
)
Bases: FutureValue
, Generic[R]
Represent a function call that may not be ready yet.
Parameters:
-
func
(Callable[..., R]
) –The function to call.
-
*args
(Any
, default:()
) –The arguments of the function.
-
executor_type
(ExecutorType
, default:GENERAL_THREAD_POOL
) –The type of the executor to run the call.
-
lazy_eval
(bool
, default:False
) –Whether to delay the start of the call until needed.
-
**kwargs
(Any
, default:{}
) –The keyword arguments of the function.
Source code in src/appl/core/types/futures.py
result
¶
Get the result of the call.
Source code in src/appl/core/types/futures.py
CmpStringFuture
¶
CmpStringFuture(
a: StringFuture,
b: StringFuture,
op: Callable[[str, str], bool],
)
Bases: FutureValue
Represent a comparison between a StringFuture and another value.
Source code in src/appl/core/types/futures.py
FutureValue
¶
StringFuture
¶
Bases: FutureValue
, BaseModel
StringFuture is a string that may not be ready yet.
Source code in src/appl/core/types/futures.py
from_list
classmethod
¶
from_list(content: List[Any]) -> StringFuture
join
¶
join(iterable: Iterable[StringFuture]) -> StringFuture
Concatenate any number of strings.
The StringFuture whose method is called is inserted in between each given StringFuture. The result is returned as a new StringFuture.
Source code in src/appl/core/types/futures.py
materialized
¶
materialized() -> StringFuture