pysepal.sepalwidgets.inputs.AssetSelect#

class pysepal.sepalwidgets.inputs.AssetSelect(*args, **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’

  • gee_session (EESession | None) – the Earth Engine session to use (deprecated in favor of gee_interface)

  • gee_interface (GEEInterface | None) – a shared GEEInterface instance. If provided, takes precedence over gee_session

  • on_search_input (bool) – whether to trigger the search input event. Default to False

  • test (bool) – whether to enable debug logging for this instance. Default to False

  • kwargs (optional) – any parameter from a v.ComboBox.

Raises:

ValueError – if both gee_session and gee_interface are provided

Added in version 3.0.0: Added gee_interface parameter for sharing GEEInterface instances across components.

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

__init__

Custom widget input to select an asset inside the asset folder of the user.

AssetSelect.__init__(folder='', types=['IMAGE', 'TABLE'], default_asset=[], gee_session=None, gee_interface=None, on_search_input=True, test=False, **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’

  • gee_session (EESession | None) – the Earth Engine session to use (deprecated in favor of gee_interface)

  • gee_interface (GEEInterface | None) – a shared GEEInterface instance. If provided, takes precedence over gee_session

  • on_search_input (bool) – whether to trigger the search input event. Default to False

  • test (bool) – whether to enable debug logging for this instance. Default to False

  • kwargs (optional) – any parameter from a v.ComboBox.

Raises:

ValueError – if both gee_session and gee_interface are provided

Return type:

None

Added in version 3.0.0: Added gee_interface parameter for sharing GEEInterface instances across components.