App
The App class controls how the notebook is displayed in the Mercury.
import mercury as mr
# set Application parameters
app = mr.App(title="",
description="",
show_code=False,
show_prompt=False,
continuous_update=True,
static_notebook=False,
show_sidebar=True,
full_screen=True,
allow_download=True,
allow_share=True,
stop_on_error=False
)Parameters
- title (string) - title of the application, it will be used in the home view and in sidebar.
- description (string) - description of the application, it will be used in the home view.
- show_code (boolean) - set to
Trueto show code of the notebook, default is set toFalsewhich means that code is hidden. - show_prompt (boolean) - set to
Trueif you want to show notebook prompt in the application, theshow_codeneeds to beTrueas well. Default is set toFalse. - continuous_update (boolean) - default is set to
Truewhich means that notebook is recomputed immediately after widget value change. Please set toFalseif you want to have updates after clickingRunbutton. - static_notebook (boolean) - when set to
Truenotebook will not be recomputed on any widget change (notebook is static). Default isFalsewhich means that app presented in Mercury is interactive. - show_sidebar (boolean) - you can hide sidebar when Mercury App is open. User can open sidebar by clicking in the top right blue button with arror. By default sidebar is displayed.
- full_screen (boolean) - by default (
True) notebook is displayed with full width. Please setFalseto limit notebook width to1140px. - allow_download (boolean) - by default there is
Downloadbutton available to export results as PDF or HTML file. You can hideDownloadbutton by settingallow_download=False. - allow_share (boolean) - by default there is
Sharebutton availabe to export results as a URL. You can hideSharebutton by settingallow_share=False. - stop_on_error (boolean) - by default (
False) notebook will execute all cells even with errors. When set toTruenotebook will stop execution when error occured in the cell.