Skip to content

Commit

Permalink
Align Param docstring (#6989)
Browse files Browse the repository at this point in the history
* add misssing docstring

* improve explanation
  • Loading branch information
MarcSkovMadsen authored Jul 16, 2024
1 parent 6294f3d commit 4e912d3
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions panel/param.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,25 @@ def set_values(*parameterizeds, **param_values):

class Param(Pane):
"""
Param panes render a Parameterized class to a set of widgets which
are linked to the parameter values on the class.
Param panes render a Parameterized class into a set of interactive widgets
that are dynamically linked to the parameter values of the class.
Reference: https://panel.holoviz.org/reference/panes/Param.html
Example:
>>> import param
>>> import panel as pn
>>> pn.extension()
>>> class App(param.Parameterized):
>>> some_text = param.String(default="Hello")
>>> some_float = param.Number(default=1, bounds=(0, 10), step=0.1)
>>> some_boolean = param.Boolean(default=True)
>>> app = App()
>>> pn.Param(app, parameters=["some_text", "some_float"], show_name=False).servable()
"""

display_threshold = param.Number(default=0, precedence=-10, doc="""
Expand Down

0 comments on commit 4e912d3

Please sign in to comment.