Platform Integration Widgets
Below is a comprehensive list of platform widgets that enable integration with different parts of the Latch platform.Registry Table
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 Attributes:
w_registry_table_picker
widget to select a table from the registry, or supply a table id directly.Widget Parameters
label
: string required label displayed above the tabletable_id
: string required identifier for the registry table to displayreadonly
: bool optional, defaults to False. When True, the table is read-onlydefault
: string | None optional default table idappearance
: FormInputAppearance | None optional appearance configurationkey
: string optional unique identifier for the widgetValue
The widget value returns aRegistryTableValue
object with the following structure:-
table
: Table - The registry table object containing the data and metadata. -
selected_rows
: list[Record] - A list of selected row records from the table. Returns an empty list if no rows are selected.
Table
object provides access to the table’s data, schema, and metadata, while Record
objects represent individual rows with their field values and metadata. Learn more about the Table API and Record API.Usage Notes
- The registry table widget provides an interactive interface to view and interact with registry data
- The widget returns a
RegistryTableValue
containing the table object - The table object can be accessed via the
value
property
Workflow Output
Workflow Output
The Workflow output widget allows you to launch and execute workflows directly from your notebook interface.Class
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 executionClass
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 outputsIf the execution status is “FAILED” or “ABORTED”, it retrieves the ingress_data and returns a CompletedExecution object with an empty output dictionary.
Widget Parameters
label
: string required label for the workflow buttonwf_name
: string required name of the workflow to executeparams
: dict required dictionary of parameters to pass to the workflow.version
: string | None optional version of the workflow to use, defaults to the latest versionreadonly
: bool optional, defaults to False. When True, the workflow button is disabledkey
: string optional unique identifier for the widgetClass 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 executionClass 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 outputsIf the execution status is “FAILED” or “ABORTED”, it retrieves the ingress_data and returns a CompletedExecution object with an empty output dictionary.Usage Notes
- The workflow widget creates a button that, when clicked, launches the specified workflow
- The widget’s
value()
method returns either anExecution
object containing information about the launched workflow orNone
if no executions have been launched. - To retrieve the outputs of the execution, call the
Execution
object’s asynchronouswait
method which returns aCompletedExecution
object.
Latch Data Browser
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.
Widget Parameters
label
: string required label displayed above the browserdir
: 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-onlyappearance
: FormInputAppearance | None optional appearance configurationkey
: string optional unique identifier for the widgetValue
The widget value returns anLPath
object representing the selected directory that can be integrated with your analysis. Learn more about the LPath API.Usage Notes
- The Latch Data Browser widget provides an interactive interface to browse directory structures and pull in files from the platform
- The widget automatically validates that the provided path is a valid directory