I can turn off the modebar in plotly by passing displayModeBar: False as the value of config in fig.show(), like this-
import plotly.express as px
df = px.data.stocks()
fig = px.line(df, x='date', y='GOOG')
fig.show(config={'displayModeBar':False})
But is there a way I could do it just once for the entire session rather than having to pass it with each figure call?