API Docs
App

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 True to show code of the notebook, default is set to False which means that code is hidden.
  • show_prompt (boolean) - set to True if you want to show notebook prompt in the application, the show_code needs to be True as well. Default is set to False.
  • continuous_update (boolean) - default is set to True which means that notebook is recomputed immediately after widget value change. Please set to False if you want to have updates after clicking Run button.
  • static_notebook (boolean) - when set to True notebook will not be recomputed on any widget change (notebook is static). Default is False which 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 set False to limit notebook width to 1140px.
  • allow_download (boolean) - by default there is Download button available to export results as PDF or HTML file. You can hide Download button by setting allow_download=False.
  • allow_share (boolean) - by default there is Share button availabe to export results as a URL. You can hide Share button by setting allow_share=False.
  • stop_on_error (boolean) - by default (False) notebook will execute all cells even with errors. When set to True notebook will stop execution when error occured in the cell.