2.0.0b47
Link
Package: flyte
Base class for protocol classes.
Protocol classes are defined as::
class Proto(Protocol):
def meth(self) -> int:
...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing).
For example::
class C:
def meth(self) -> int:
return 0
def func(x: Proto) -> int:
return x.meth()
func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as::
class GenProto[T](Protocol):
def meth(self) -> T:
...
protocol Link()Methods
| Method | Description |
|---|---|
get_link() |
Returns a task log link given the action. |
get_link()
def get_link(
run_name: str,
project: str,
domain: str,
context: typing.Dict[str, str],
parent_action_name: str,
action_name: str,
pod_name: str,
) -> strReturns a task log link given the action. Link can have template variables that are replaced by the backend.
| Parameter | Type | Description |
|---|---|---|
run_name |
str |
The name of the run. |
project |
str |
The project name. |
domain |
str |
The domain name. |
context |
typing.Dict[str, str] |
Additional context for generating the link. |
parent_action_name |
str |
The name of the parent action. |
action_name |
str |
The name of the action. |
pod_name |
str |
The name of the pod. :return: The generated link. |