SpectAcoular documentation

BaseSpectacoular

«  spectacoular.factory.get_widgets   ::   factory   ::   NumericInputMapper  »

BaseSpectacoular

class spectacoular.factory.BaseSpectacoular

Bases: HasPrivateTraits

Base class for any class defined in the SpectAcoular module.

It provides the necessary methods to create widgets from trait attributes and to assign Bokeh’s widgets to trait attributes. This class has no real functionality on its own and should not be used directly.

trait_widget_mapper = Dict({

dictionary containing the mapping between a class trait attribute and a Bokeh widget. Keys: name of the trait attribute. Values: Bokeh widget.

trait_widget_args = Dict({

dictionary containing arguments that belongs to a widget that is created from a trait attribute and should be considered when the widget is built. For example: {“traitname”:{‘disabled’:True,’background_color’:’red’,…}}.

get_widgets(trait_widget_mapper={}, trait_widget_args={})

function to create widgets from class trait attributes

set_widgets(**kwargs)

function to assign widget instances to class trait attributes

«  spectacoular.factory.get_widgets   ::   factory   ::   NumericInputMapper  »