pysepal.solara.decorators.with_sepal_sessions#

pysepal.solara.decorators.with_sepal_sessions(show_loading=True, waiting_message='Waiting for authentication headers...', module_name='default', error_handler=None)[source]#

Decorator that ensures a GEE interface is available before running the Solara Page component.

Parameters:
  • show_loading (bool) – Whether to show loading messages when session is not ready.

  • waiting_message (str) – Message to show when waiting for headers.

  • module_name (str) – The module name for the SepalClient.

  • error_handler (Callable[[Exception], None] | None) – Custom error handler function. If None, uses default error handling.

Returns:

Decorator function.

Example

@with_sepal_sessions(module_name="my.module")
def Page():
    gee_interface = get_current_gee_interface()
    sepal_client = get_current_sepal_client()

    # Your component logic here
    solara.Markdown("GEE interface is ready!")