Task
No overview available.
Attributes
| Attribute | Type | Description |
|---|---|---|
| pb2 | task_definition_pb2.Task | The task protobuf definition. |
Constructor
Signature
def Task(
pb2: task_definition_pb2.Task
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| pb2 | task_definition_pb2.Task | The task protobuf definition. |
Methods
name()
@classmethod
def name() - > str
The name of the task.
Returns
| Type | Description |
|---|---|
str | The name of the task. |
version()
@classmethod
def version() - > str
The version of the task.
Returns
| Type | Description |
|---|---|
str | The version of the task. |
entrypoint()
@classmethod
def entrypoint() - > bool
Whether this task is marked as an entrypoint. Not populated in listing responses; fetch TaskDetails to read the authoritative value from the task template.
Returns
| Type | Description |
|---|---|
bool | Whether this task is marked as an entrypoint. |
url()
@classmethod
def url() - > str
Get the console URL for viewing the task.
Returns
| Type | Description |
|---|---|
str | The console URL for viewing the task. |
get()
@classmethod
def get(
name: str,
project: str | None = None,
domain: str | None = None,
version: str | None = None,
auto_version: AutoVersioning | None = None
) - > LazyEntity
Get a task by its ID or name. If both are provided, the ID will take precedence. Either version or auto_version are required parameters.
Parameters
| Name | Type | Description |
|---|---|---|
| name | str | The name of the task. |
| project | `str | None` = None |
| domain | `str | None` = None |
| version | `str | None` = None |
| auto_version | `AutoVersioning | None` = None |
Returns
| Type | Description |
|---|---|
LazyEntity | The LazyEntity representing the task. |
listall()
@classmethod
def listall(
by_task_name: str | None = None,
by_task_env: str | None = None,
project: str | None = None,
domain: str | None = None,
sort_by: Tuple[str, Literal["asc", "desc"]]| None = None,
limit: int = 100,
entrypoint: bool | None = None
) - > Union[AsyncIterator[[Task](task.md?sid=flyte_remote__task_task)], Iterator[[Task](task.md?sid=flyte_remote__task_task)]]
Get all tasks for the current project and domain.
Parameters
| Name | Type | Description |
|---|---|---|
| by_task_name | `str | None` = None |
| by_task_env | `str | None` = None |
| project | `str | None` = None |
| domain | `str | None` = None |
| sort_by | `Tuple[str, Literal["asc", "desc"]] | None` = None |
| limit | int = 100 | The maximum number of tasks to return. |
| entrypoint | `bool | None` = None |
Returns
| Type | Description |
|---|---|
Union[AsyncIterator[[Task](task.md?sid=flyte_remote__task_task)], Iterator[[Task](task.md?sid=flyte_remote__task_task)]] | An iterator of tasks. |