I want to use python code for Bokeh server and use it as library as well. So I modularize my code by _name_=='__main__'
, but standalone Bokeh server is not getting triggered.
def initialize_WatchDataFrame():
print("Initialize Watchlist")
if __name__ == "__main__":
initialize_WatchDataFrame()
curdoc().add_periodic_callback(update_WatchDataFrame, 2000)
curdoc().title = "WatchList"
So when i was running the server with "bokeh serve Watchlist.py". I dont see the call to initialize_WatchDataFrame() being made.