flytekit.clients.raw.RawSynchronousFlyteClient

class flytekit.clients.raw.RawSynchronousFlyteClient(cfg, **kwargs)[source]

This is a thin synchronous wrapper around the auto-generated GRPC stubs for communicating with the admin service.

This client should be usable regardless of environment in which this is used. In other words, configurations should be explicit as opposed to inferred from the environment or a configuration file. To create a client,

from flytekit.configuration import PlatformConfig
RawSynchronousFlyteClient(PlatformConfig(endpoint="a.b.com", insecure=True))  # or
SynchronousFlyteClient(PlatformConfig(endpoint="a.b.com", insecure=True))

Methods

Parameters:

cfg (PlatformConfig)

Parameters:

create_download_link_request (CreateDownloadLinkRequest)

Return type:

CreateDownloadLinkResponse

create_download_location(create_download_location_request)[source]
Parameters:

create_download_location_request (CreateDownloadLocationRequest)

Return type:

CreateDownloadLocationResponse

create_execution(create_execution_request)[source]

This will create an execution for the given execution spec. :param flyteidl.admin.execution_pb2.ExecutionCreateRequest create_execution_request: :rtype: flyteidl.admin.execution_pb2.ExecutionCreateResponse

create_launch_plan(launch_plan_create_request)[source]

This will create a launch plan definition in the Admin database. Once successful, the launch plan object can be retrieved via the client or viewed via the UI or command-line interfaces.

Note

Overwrites are not supported so any request for a given project, domain, name, and version that exists in the database must match the existing definition exactly. This also means that as long as the request remains identical, calling this method multiple times will result in success.

Param:

flyteidl.admin.launch_plan_pb2.LaunchPlanCreateRequest launch_plan_create_request: The request protobuf object

Return type:

flyteidl.admin.launch_plan_pb2.LaunchPlanCreateResponse

Raises:
  • flytekit.common.exceptions.user.FlyteEntityAlreadyExistsException – If an identical version of the launch plan is found, this exception is raised. The client might choose to ignore this exception because the identical launch plan is already registered.

  • grpc.RpcError

create_task(task_create_request)[source]

This will create a task definition in the Admin database. Once successful, the task object can be retrieved via the client or viewed via the UI or command-line interfaces.

Note

Overwrites are not supported so any request for a given project, domain, name, and version that exists in the database must match the existing definition exactly. This also means that as long as the request remains identical, calling this method multiple times will result in success.

Param:

flyteidl.admin.task_pb2.TaskCreateRequest task_create_request: The request protobuf object.

Return type:

flyteidl.admin.task_pb2.TaskCreateResponse

Raises:
  • flytekit.common.exceptions.user.FlyteEntityAlreadyExistsException – If an identical version of the task is found, this exception is raised. The client might choose to ignore this exception because the identical task is already registered.

  • grpc.RpcError

create_upload_location(create_upload_location_request)[source]

Get a signed url to be used during fast registration :param flyteidl.service.dataproxy_pb2.CreateUploadLocationRequest create_upload_location_request: :rtype: flyteidl.service.dataproxy_pb2.CreateUploadLocationResponse

Parameters:

create_upload_location_request (CreateUploadLocationRequest)

Return type:

CreateUploadLocationResponse

create_workflow(workflow_create_request)[source]

This will create a workflow definition in the Admin database. Once successful, the workflow object can be retrieved via the client or viewed via the UI or command-line interfaces.

Note

Overwrites are not supported so any request for a given project, domain, name, and version that exists in the database must match the existing definition exactly. This also means that as long as the request remains identical, calling this method multiple times will result in success.

Param:

flyteidl.admin.workflow_pb2.WorkflowCreateRequest workflow_create_request:

Return type:

flyteidl.admin.workflow_pb2.WorkflowCreateResponse

Raises:
  • flytekit.common.exceptions.user.FlyteEntityAlreadyExistsException – If an identical version of the workflow is found, this exception is raised. The client might choose to ignore this exception because the identical workflow is already registered.

  • grpc.RpcError

get_active_launch_plan(active_launch_plan_request)[source]

Retrieves a launch plan entity.

Parameters:

active_launch_plan_request (flyteidl.admin.common_pb2.ActiveLaunchPlanRequest)

Return type:

flyteidl.admin.launch_plan_pb2.LaunchPlan

get_execution(get_object_request)[source]

Returns an execution of a workflow entity.

Parameters:

get_object_request (flyteidl.admin.execution_pb2.WorkflowExecutionGetRequest)

Return type:

flyteidl.admin.execution_pb2.Execution

get_execution_data(get_execution_data_request)[source]

Returns signed URLs to LiteralMap blobs for an execution’s inputs and outputs (when available).

Parameters:

get_execution_data_request (flyteidl.admin.execution_pb2.WorkflowExecutionGetRequest)

Return type:

flyteidl.admin.execution_pb2.WorkflowExecutionGetDataResponse

get_execution_metrics(get_execution_metrics_request)[source]

Returns metrics partitioning and categorizing the workflow execution time-series.

Parameters:

get_execution_metrics_request (flyteidl.admin.execution_pb2.WorkflowExecutionGetMetricsRequest)

Return type:

flyteidl.admin.execution_pb2.WorkflowExecutionGetMetricsResponse

get_launch_plan(object_get_request)[source]

Retrieves a launch plan entity.

Parameters:

object_get_request (flyteidl.admin.common_pb2.ObjectGetRequest)

Return type:

flyteidl.admin.launch_plan_pb2.LaunchPlan

get_node_execution(node_execution_request)[source]
Parameters:

node_execution_request (flyteidl.admin.node_execution_pb2.NodeExecutionGetRequest)

Return type:

flyteidl.admin.node_execution_pb2.NodeExecution

get_node_execution_data(get_node_execution_data_request)[source]

Returns signed URLs to LiteralMap blobs for a node execution’s inputs and outputs (when available).

Parameters:

get_node_execution_data_request (flyteidl.admin.node_execution_pb2.NodeExecutionGetDataRequest)

Return type:

flyteidl.admin.node_execution_pb2.NodeExecutionGetDataResponse

get_project_domain_attributes(project_domain_attributes_get_request)[source]

This fetches the attributes for a project and domain registered with the Flyte Admin Service :param flyteidl.admin.ProjectDomainAttributesGetRequest project_domain_attributes_get_request: :rtype: flyteidl.admin.ProjectDomainAttributesGetResponse

get_task(get_object_request)[source]

This returns a single task for a given identifier.

Param:

flyteidl.admin.common_pb2.ObjectGetRequest get_object_request:

Return type:

flyteidl.admin.task_pb2.Task

Raises:

TODO

get_task_execution(task_execution_request)[source]
Parameters:

task_execution_request (flyteidl.admin.task_execution_pb2.TaskExecutionGetRequest)

Return type:

flyteidl.admin.task_execution_pb2.TaskExecution

get_task_execution_data(get_task_execution_data_request)[source]

Returns signed URLs to LiteralMap blobs for a task execution’s inputs and outputs (when available).

Parameters:

get_task_execution_data_request (flyteidl.admin.task_execution_pb2.TaskExecutionGetDataRequest)

Return type:

flyteidl.admin.task_execution_pb2.TaskExecutionGetDataResponse

get_workflow(get_object_request)[source]

This returns a single workflow for a given identifier.

Param:

flyteidl.admin.common_pb2.ObjectGetRequest get_object_request:

Return type:

flyteidl.admin.workflow_pb2.Workflow

Raises:

TODO

get_workflow_attributes(workflow_attributes_get_request)[source]

This fetches the attributes for a project, domain, and workflow registered with the Flyte Admin Service :param flyteidl.admin.GetWorkflowAttributesAttributesRequest workflow_attributes_get_request: :rtype: flyteidl.admin.WorkflowAttributesGetResponse

list_active_launch_plans_paginated(active_launch_plan_list_request)[source]

Lists Active Launch Plans for a given (project, domain)

Param:

flyteidl.admin.common_pb2.ActiveLaunchPlanListRequest active_launch_plan_list_request:

Return type:

flyteidl.admin.launch_plan_pb2.LaunchPlanList

list_executions_paginated(resource_list_request)[source]

Lists the executions for a given identifier.

Parameters:

resource_list_request (flyteidl.admin.common_pb2.ResourceListRequest)

Return type:

flyteidl.admin.execution_pb2.ExecutionList

list_launch_plan_ids_paginated(identifier_list_request)[source]

Lists launch plan named identifiers for a given project and domain.

Param:

flyteidl.admin.common_pb2.NamedEntityIdentifierListRequest identifier_list_request:

Return type:

flyteidl.admin.common_pb2.NamedEntityIdentifierList

list_launch_plans_paginated(resource_list_request)[source]

Lists Launch Plans for a given Identifier (project, domain, name)

Param:

flyteidl.admin.common_pb2.ResourceListRequest resource_list_request:

Return type:

flyteidl.admin.launch_plan_pb2.LaunchPlanList

list_matchable_attributes(matchable_attributes_list_request)[source]

This fetches the attributes for a specific resource type registered with the Flyte Admin Service :param flyteidl.admin.ListMatchableAttributesRequest matchable_attributes_list_request: :rtype: flyteidl.admin.ListMatchableAttributesResponse

list_node_executions_for_task_paginated(node_execution_for_task_list_request)[source]
Parameters:

node_execution_for_task_list_request (flyteidl.admin.node_execution_pb2.NodeExecutionListRequest)

Return type:

flyteidl.admin.node_execution_pb2.NodeExecutionList

list_node_executions_paginated(node_execution_list_request)[source]
Parameters:

node_execution_list_request (flyteidl.admin.node_execution_pb2.NodeExecutionListRequest)

Return type:

flyteidl.admin.node_execution_pb2.NodeExecutionList

list_projects(project_list_request=None)[source]

This will return a list of the projects registered with the Flyte Admin Service :param flyteidl.admin.project_pb2.ProjectListRequest project_list_request: :rtype: flyteidl.admin.project_pb2.Projects

Parameters:

project_list_request (ProjectListRequest | None)

list_signals(signal_list_request)[source]

This lists signals

Parameters:

signal_list_request (SignalListRequest)

Return type:

SignalList

list_task_executions_paginated(task_execution_list_request)[source]
Parameters:

task_execution_list_request (flyteidl.admin.task_execution_pb2.TaskExecutionListRequest)

Return type:

flyteidl.admin.task_execution_pb2.TaskExecutionList

list_task_ids_paginated(identifier_list_request)[source]

This returns a page of identifiers for the tasks for a given project and domain. Filters can also be specified.

Note

The name field in the TaskListRequest is ignored.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Param:

flyteidl.admin.common_pb2.NamedEntityIdentifierListRequest identifier_list_request:

Return type:

flyteidl.admin.common_pb2.NamedEntityIdentifierList

Raises:

TODO

list_tasks_paginated(resource_list_request)[source]

This returns a page of task metadata for tasks in a given project and domain. Optionally, specifying a name will limit the results to only tasks with that name in the given project and domain.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Param:

flyteidl.admin.common_pb2.ResourceListRequest resource_list_request:

Return type:

flyteidl.admin.task_pb2.TaskList

Raises:

TODO

list_workflow_ids_paginated(identifier_list_request)[source]

This returns a page of identifiers for the workflows for a given project and domain. Filters can also be specified.

Note

The name field in the WorkflowListRequest is ignored.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Param:

flyteidl.admin.common_pb2.NamedEntityIdentifierListRequest identifier_list_request:

Return type:

flyteidl.admin.common_pb2.NamedEntityIdentifierList

Raises:

TODO

list_workflows_paginated(resource_list_request)[source]

This returns a page of workflow meta-information for workflows in a given project and domain. Optionally, specifying a name will limit the results to only workflows with that name in the given project and domain.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Param:

flyteidl.admin.common_pb2.ResourceListRequest resource_list_request:

Return type:

flyteidl.admin.workflow_pb2.WorkflowList

Raises:

TODO

recover_execution(recover_execution_request)[source]

This will recreate an execution with the same spec as the one belonging to the given execution identifier. :param flyteidl.admin.execution_pb2.ExecutionRecoverRequest recover_execution_request: :rtype: flyteidl.admin.execution_pb2.ExecutionRecoverResponse

register_project(project_register_request)[source]

Registers a project along with a set of domains. :param flyteidl.admin.project_pb2.ProjectRegisterRequest project_register_request: :rtype: flyteidl.admin.project_pb2.ProjectRegisterResponse

relaunch_execution(relaunch_execution_request)[source]
Parameters:

relaunch_execution_request (flyteidl.admin.execution_pb2.ExecutionRelaunchRequest)

Return type:

flyteidl.admin.execution_pb2.ExecutionCreateResponse

set_signal(signal_set_request)[source]

This sets a signal

Parameters:

signal_set_request (SignalSetRequest)

Return type:

SignalSetResponse

terminate_execution(terminate_execution_request)[source]
Parameters:

terminate_execution_request (flyteidl.admin.execution_pb2.TerminateExecutionRequest)

Return type:

flyteidl.admin.execution_pb2.TerminateExecutionResponse

update_launch_plan(update_request)[source]

Allows updates to a launch plan at a given identifier. Currently, a launch plan may only have it’s state switched between ACTIVE and INACTIVE.

Parameters:

update_request (flyteidl.admin.launch_plan_pb2.LaunchPlanUpdateRequest)

Return type:

flyteidl.admin.launch_plan_pb2.LaunchPlanUpdateResponse

update_named_entity(update_named_entity_request)[source]
Parameters:

update_named_entity_request (flyteidl.admin.common_pb2.NamedEntityUpdateRequest)

Return type:

flyteidl.admin.common_pb2.NamedEntityUpdateResponse

update_project(project)[source]

Update an existing project specified by id. :param flyteidl.admin.project_pb2.Project project: :rtype: flyteidl.admin.project_pb2.ProjectUpdateResponse

update_project_domain_attributes(project_domain_attributes_update_request)[source]

This updates the attributes for a project and domain registered with the Flyte Admin Service :param flyteidl.admin.ProjectDomainAttributesUpdateRequest project_domain_attributes_update_request: :rtype: flyteidl.admin.ProjectDomainAttributesUpdateResponse

update_workflow_attributes(workflow_attributes_update_request)[source]

This updates the attributes for a project, domain, and workflow registered with the Flyte Admin Service :param flyteidl.admin.UpdateWorkflowAttributesRequest workflow_attributes_update_request: :rtype: flyteidl.admin.WorkflowAttributesUpdateResponse

classmethod with_root_certificate(cfg, root_cert_file)[source]
Parameters:
Return type:

RawSynchronousFlyteClient

Attributes

url