Try something like this. I feel like this is a bit of a hack, so maybe there is a better way.
import param
import panel as pn
pn.extension()
class A(param.Parameterized):
score = param.Range(
default=(0, 250),
bounds=(0, 250),
)
def __init__(self, **params):
super().__init__(**params)
self.controls = pn.Param(self, widgets={
"score": {"type": pn.widgets.IntRangeSlider},
})
self.score_widget = self.controls[1]
@param.depends("score_widget.value_throttled")
def calculation(self):
return self.score
a = A()
pn.Column(a.score_widget, a.calculation)