I would like to understand how to replicate my development steps of streamlit with panel.
In streamlit I was working out of a .py file (in vscode) and once I ran streamlit run script.py if I made any changes to the .py file I would get prompted on the dashboard that the source has changed and do I want to re-run (or always re-run). I would select always re-run for fast development and to stay away from the terminal.
If I am to replicate this with panel (although I know panel is more jupyter friendly for development with the extension). I run panel serve script.py --show (just thinking out loud: should --show be default?). Also if I kill it i’ll have to bump the port number (panel serve script.py --show --port 5007) as the previous command won’t work (in streamlit the ports are bumped each call which I prefer as a lazy developer). Is there a way the dashboard can be updated after calling panel server script.py and changing script.py without launching the server command again?
Last question: Is .servable() required after every element I want to show? (for .py development).
Sorry there are a few comments/questions in here. Looking forward to becoming more familiar with all dashboarding tools (one can aspire to be @Marc!). Thanks for everyone’s work on this project.
I hope you would find the .py development experience using panel serve name_of_script.py --autoreload --show and marking whatever you want to server as .servable very easy. That is the intention.
Please share suggestions for improvements as you go along.
Here is an example using an api similar to Streamlits
Yes marking the objects you want to serve with .servable() and using --autoreload is the way.
As for:
although I know panel is more jupyter friendly for development with the extension
I wouldn’t really say Panel is more Jupyter friendly, with autoreload developing an app from a python files is pretty good. But if you like (I personally do), you can also develop your app or bits of your app in a notebook.