Platform widgets enable you to integrate and interact with other parts of the Latch platform directly within your plots and analysis workflows. These widgets provide seamless access to registry data, workflows, and file systems.
Platform widgets are specialized components that allow you to pull in and interact with other parts of the Latch platform directly within your plots and analysis workflows. These widgets serve as bridges between your visualizations and the broader platform ecosystem, enabling dynamic data integration and interactive workflows.
Below is a comprehensive list of platform widgets that enable integration with different parts of the Latch platform.
Registry Table
The Registry Table output widget allows you to display and interact with registry tables in your notebook interface.
You can also use the w_registry_table_picker
widget to select a table from the registry, or supply a table id directly.
label
: string required label displayed above the table
table_id
: string required identifier for the registry table to display
readonly
: bool optional, defaults to False. When True, the table is read-only
default
: string | None optional default table id
appearance
: FormInputAppearance | None optional appearance configuration
key
: string optional unique identifier for the widget
RegistryTableValue
containing the table objectvalue
propertyWorkflow Output
The Workflow output widget allows you to launch and execute workflows directly from your notebook interface.
label
: string required label for the workflow button
wf_name
: string required name of the workflow to execute
params
: dict required dictionary of parameters to pass to the workflow.
version
: string | None optional version of the workflow to use, defaults to the latest version
readonly
: bool optional, defaults to False. When True, the workflow button is disabled
key
: string optional unique identifier for the widget
CompletedExecution
The CompletedExecution dataclass represents the final state of an execution, whether it succeeded, failed, or was aborted.
Attributes id (str): A unique identifier for the execution.
output (dict[str, Any]): A dictionary containing the processed output of the execution. This will be populated if the execution succeeded.
ingress_data (list[LPath]): A list of LPath objects, representing data that was written to LData during the execution.
status (ExecutionStatus): The final status of the execution
Execution
The Execution class represents an running or completed execution. It provides methods to poll the status of an execution and wait for its completion.
Attributes id (str): A unique identifier for the execution.
python_outputs (dict[str, type]): A dictionary mapping output names to their expected Python types. This is used when processing the execution’s output.
status (ExecutionStatus): The current status of the execution. Defaults to “UNDEFINED”.
outputs_url (Union[str, None]): The URL where the execution’s outputs can be found, if available. Defaults to None.
flytedb_id (Union[str, None]): The FlyteDB ID associated with the execution, if available. Defaults to None. This attribute is updated during polling.
Methods poll(self) -> Generator[None, Any, None] This is a generator method that continuously polls the status of the execution.
wait(self) -> Union[CompletedExecution, None] Asynchronous method that waits for the execution to complete and returns the execution outputs
If the execution status is “FAILED” or “ABORTED”, it retrieves the ingress_data and returns a CompletedExecution object with an empty output dictionary.
value()
method returns either an Execution
object containing information about the launched workflow or None
if no executions have been launched.Execution
object’s asynchronous wait
method which returns a CompletedExecution
object.Latch Data Browser
The LData Browser widget enables you to pull in and interact with files and directories from your Latch workspace directly within your plots. This widget creates a connection to the platform’s file system, allowing users to browse and upload files.
label
: string required label displayed above the browser
dir
: string | LPath required path to the directory to browse. Can be a string or LPath object “latch://<workspace_id>.account/<path>” will only work for the corresponding workspace_id, but “latch:///<path>” will work for any workspace that has that path.
readonly
: bool optional, defaults to False. When True, the browser is read-only
appearance
: FormInputAppearance | None optional appearance configuration
key
: string optional unique identifier for the widget
LPath
object representing the selected directory that can be integrated with your analysisOutput widgets are reactive to changes in their source data. When the source plot or data is updated, the widget display will automatically update to reflect the changes.