I would like to start using panel library by building hopefully simple dashboards based on a template (let’s say FastListTemplate) to understand what can be done with panel.
While there are examples online to get you started, I noticed that most of the examples are based on using panel within a Notebook. Personally I want to learn to use it as a standalone app, launched for instance using panel serve dashboard.py
Here is a use case I have in mind to start with:
One button to read a dataframe from a local file
One button to update the dataframe which was read (act more like a filtering button)
One tabulator with the dataframe (first 50 rows for instance)
One input field which accepts only strings
One input field which accepts only integers
The two input fields will be used to either return the dataframe with rows containing certain string, or rown which have a column with higher values.
I know this is vague without some data provided, but what I hope for is a starting point as I am stuck to even get started. I also fail to understand how multiple elements can interact with each other and pass values between them.
@Marc, thanks for your reply.
I was about to ask about wrapping it into a template, when you already answered.
Interesting your example - I was under the impression that almost always there should be a class A(pn.viewable.Viewable) or class A(param.Parameterized) in order to link the elements as a best practice. Honestly, I am not even sure what are the pros and cons between the different methods - but that’s a question for another topic. I will try to build-up on your example and probably will ask more questions.
There is more than one way to do things with Panel because it needs to support different types of developers and different types of development environments.
I chose to target a “beginning pythonista” that does not know (much) about classes and annotations . Thus I stayed away from Parameterized or Viewable classes. I also stayed away from the @pn.depends notation.
Personally I like the class based approach - especially as my app grows or I want to build reusable components.