SelectTagMeta
Introduction
SelectTagMeta
widget in Supervisely is a drop down menu that allows users to select a TagMeta
from a list of available tag metadatas. The widget can be customized with various parameters, such as the default selected tag metadata, default project ID, size, allowed types, multiple selection, label showing.
Function signature
Parameters
Parameters | Type | Description |
---|---|---|
|
|
|
|
| Determine |
|
| Determine |
|
| Determine |
|
| Allows to select multiple |
|
| Show label |
|
| Selector size |
|
| ID of the widget |
default
Determine Tag
will be selected by default.
type: str
default value: None
project_id
Determine Project
from which Tags
will be selected.
type: int
default value: None
project_meta
Determine ProjectMeta
from which Tags
will be selected.
type: ProjectMeta
default value: None
allowed_types
Determine Tags
types witch will be available to select from all Project
Tags
. Possible Tag
types: any_number
, any_string
, one_of_string
, none
.
type: List[str]
default value: None
multiselect
Allows to select multiple Tags
.
type: bool
default value: False
show_label
Determine show text Tag
on widget or not.
type: bool
default value: True
size
Size of input.
type: Literal["large", "small", "mini", None]
default value: None
widget_id
ID of the widget.
type: str
default value: None
Methods and attributes
Attributes and Methods | Description |
---|---|
| Return selected tag name. If multiselect is |
| Return |
| Return |
| Return |
| Return |
| Set |
| Set |
Mini App Example
You can find this example in our Github repository:
ui-widgets-demos/selection/007_select_tag_meta/src/main.py
Import libraries
Init API client
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Prepare Project
ID
Project
IDInitialize SelectTagMeta
widget
SelectTagMeta
widgetCreate app layout
Prepare a layout for app using Card
widget with the content
parameter and place widget that we've just created in the Container
widget.
Create app using layout
Create an app object with layout parameter.
Last updated