SelectAppSession
Last updated
Last updated
SelectAppSession
widget in Supervisely is a dropdown menu that allows users to select an application session from a list of available sessions. SelectAppSession
widget is particularly useful when working with multiple application sessions in Supervisely. It can be customized with various parameters, such as the size and label showing.
team_id
int
Team ID
tags
List[str]
List of possible tags
show_label
bool
Show label text
size
Literal["large", "small", "mini", None]
Selector size
operation
Literal["or", "and"]
Operation type ("or"
, "and"
)
widget_id
str
ID of the widget
Determine Team
from which run sessions will be selected.
type: int
Determines list of possible tags to select run sessions. Tags are set in config.json
file of the application in session_tags
field.
type: List[str]
Determine show text App Session
on widget or not.
type: bool
default value: false
Determine selector size (large/small/mini/None).
type: Literal["large", "small", "mini", None]
default value: mini
Determine operation type in select. Can be one of "or"
, "and"
. Setting the operation
parameter to "or"
allows users to connect to apps with any of the provided tags, while setting it to "and"
allows them to connect to apps that have all the selected tags specified.
type: str
default value: Literal["or", "and"]
ID of the widget.
type: str
default value: None
set_session_id()
Set given session id to widget
get_selected_id()
Return current selected session id
You can find this example in our Github repository:
ui-widgets-demos/selection/008_select_app_session/src/main.py
team_id
from environment variablesSelectAppSession
widgetPrepare a layout for app using Card
widget with the content
parameter and place widget that we've just created in the Container
widget.
Create an app object with layout parameter.