sepal_ui.sepalwidgets.inputs.AssetSelect#
- class sepal_ui.sepalwidgets.inputs.AssetSelect(**kwargs)[source]#
Custom widget input to select an asset inside the asset folder of the user.
- Parameters:
label – the label of the input
folder (str) – the folder of the user assets
default_asset (List) – the id of a default asset or a list of defaults
types (List) – the list of asset type you want to display to the user. type need to be from: [‘IMAGE’, ‘FOLDER’, ‘IMAGE_COLLECTION’, ‘TABLE’,’ALGORITHM’]. Default to ‘IMAGE’ & ‘TABLE’
kwargs (optional) – any parameter from a v.ComboBox.
Attributes
TYPES
Valid types of asset
asset_info
The selected asset information
default_asset
The id of a default asset or a list of default assets
folder
the folder of the user assets, mainly for debug
types
The list of types accepted by the asset selector.
valid
whether the selected asset is valid (user has access) or not
Methods
Custom widget input to select an asset inside the asset folder of the user.
- AssetSelect.__init__(folder='', types=['IMAGE', 'TABLE'], default_asset=[], **kwargs)[source]#
Custom widget input to select an asset inside the asset folder of the user.
- Parameters:
label – the label of the input
folder (str | Path) – the folder of the user assets
default_asset (str | List[str]) – the id of a default asset or a list of defaults
types (List[str]) – the list of asset type you want to display to the user. type need to be from: [‘IMAGE’, ‘FOLDER’, ‘IMAGE_COLLECTION’, ‘TABLE’,’ALGORITHM’]. Default to ‘IMAGE’ & ‘TABLE’
kwargs (optional) – any parameter from a v.ComboBox.
- Return type:
None