Not required but recommended, we recommend setting up Jupyter-based shared web authoring. You can proceed without, such as live editing from a commandline tool like vim
. However, if you are interested in a friendlier environment, see the configuration and integrations section.
- Modify Python files in
src/python/views/[your dashboard]/__init__.py
, and in-tool, hit thererun
button that appears - Add new views by adding
views/[your dsahboard]/__init__.py
with methodsdef info(): return {'name': 'x'}
anddef run(): None
- Add new dependencies: modify
src/python/requirements-app.txt
and rerundocker-compose build
and restart
Configure which dashboards AppPicker
includes:
- Disable individual dashboards: Have a dashboard's
info()
return{'enabled': False}
- Create tags and toggle them:
- Tag a dashboard view as part of
src/python/views/[your_app]/__init__.py
:info()
:{'tags': ['new_app', ...]}
- Opt-in and opt-out to tags: in
src/python/entrypoint.py
:AppPicker(include=['testing', 'new_app'], exclude=['demo'])
- Tag a dashboard view as part of
Use the css
module in your views
:
from css import all_css
def run():
all_css()
all_css(is_max_main_width=False, is_hide_dev_menu=False)
Tweak src/python/entrypoint.py
:
page_title_str ="Graph dashboard"
st.beta_set_page_config(
layout="centered", # Can be "centered" or "wide". In the future also "dashboard", etc.
initial_sidebar_state="auto", # Can be "auto", "expanded", "collapsed"
page_title=page_title_str, # String or None. Strings get appended with "• Streamlit".
page_icon='none.png', # String, anything supported by st.image, or None.
)
You are now ready to add integrations like database connections, authentication, and live editing.