Seeing if an app is served with --dev

Is it possible from within a panel application to see if the app is served with --dev? i.e. tell the difference between panel serve main.py and panel serve main.py --dev?

Hi @rosequartz

pn.config.autoreload seems to work for me

Try panel serve script.py --dev where script.py contains:

import panel as pn

print(pn.config.autoreload)

pn.panel("Hello World").servable()

Thanks so much!

1 Like