TagMetaView
Introduction
TagMetaView
is a widget in Supervisely that displays a single TagMeta and provides a convenient way to view the name, color, and tag value type.
Function signature
Parameters
Parameters | Type | Description |
---|---|---|
|
| Supervisely tag meta |
|
| If |
|
| If |
|
| ID of the widget |
tag_meta
Supervisely tag meta
type: TagMeta
show_type_text
If True
display tag value type next to tag name.
type: bool
default value: True
limit_long_names
If False
show the entire tag name if the name is quite lengthy
type: bool
default value: False
widget_id
ID of the widget.
type: str
default value: None
Mini App Example
You can find this example in our Github repository:
supervisely-ecosystem/ui-widgets-demos/media/013_tag_meta_view/src/main.py
Import libraries
Init API client
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Initialize Project ID
we will use
Project ID
we will useGet Project info and meta from server
Prepare TagMeta
for each tag in project
TagMeta
for each tag in projectGet TagMetas from project meta
Initialize TagMetaView
widget
TagMetaView
widgetIn this tutorial we will create list of TagMetaView
objects for each tag in project.
Create app layout
Prepare a layout for app using Card
, Field
widgets with the content
parameter and place widgets that we've just created in the Container
widget.
Create app using layout
Create an app object with layout parameter.
Last updated