pysepal.solara.notifications.state.Toast#

class pysepal.solara.notifications.state.Toast(id=<factory>, message='', type=ToastType.INFO, created_at=<factory>, timeout=None, count=1)[source]#

An ephemeral notification message.

Attributes

count

message

timeout

type

id

created_at

Methods

__init__

effective_timeout

Return the timeout, falling back to the type default.

Parameters:
  • id (str)

  • message (str)

  • type (ToastType)

  • created_at (float)

  • timeout (float | None)

  • count (int)

Toast.__init__(id=<factory>, message='', type=ToastType.INFO, created_at=<factory>, timeout=None, count=1)#
Parameters:
  • id (str)

  • message (str)

  • type (ToastType)

  • created_at (float)

  • timeout (float | None)

  • count (int)

Return type:

None

Toast.effective_timeout()[source]#

Return the timeout, falling back to the type default.

Return type:

float | None