neuralib.dashboard.examples.view_animal.AnimalView

class neuralib.dashboard.examples.view_animal.AnimalView[source]

Bases: View

select: Select
content: Div
__init__(animal=None)[source]
Parameters:

animal (str | None)

property title: str
property current_animal: str | None
setup()[source]

setup application top view. This function is called by BokehServer only once when the server created and opened the web browser.

In this function, you need to initialize the UI components and return the layout.

Return type:

Model

on_figure_type(attr, old, value)[source]
Parameters:
  • attr (str)

  • old (str)

  • value (str)

get_arg(key)
Parameters:

key (str)

Return type:

list[str]

on_message(message, reset)

for logging purpose. i.e., TextAreaInput bokeh widget

Parameters:
  • message (str)

  • reset (bool)

run_later(callback, *args, **kwargs)
Parameters:

callback (Callable)

run_periodic(cycle, callback, *args, **kwargs)
Parameters:
  • cycle (int)

  • callback (Callable)

run_timeout(delay, callback, *args, **kwargs)
Parameters:
  • delay (int)

  • callback (Callable)

update()

Top level UI components updating function. This function is called by BokehServer when setup() has done.

In this function, you need to initialize the data and update the UI components’ state.

document: Document