sepal_ui.scripts.decorator#

Decorators used in sepal-ui.

used for multiple use-case sucha as (but not limited): - catch errors in scripts to avoid Voila app freeze - redirect error to a specific Alert object - Initialize EE - debug widgets …

Functions

catch_errors

Decorator to execute try/except sentence and catch errors in the alert message.

init_ee

Initialize earth engine according to the environment.

loading_button

Decorator to execute try/except sentence and toggle loading button object.

need_ee

Decorator to execute check if the object require EE binding.

switch

Decorator to switch the state of input boolean parameters on class widgets or the class itself.