Appmode#
Jupyter extension that turns notebooks into web applications.
Example#
When you click on the notebook app-example.ipynb becomes a clear web application for a calculator:
Installation#
For the Jupyter service appmode must be installed with
$ pipenv install appmode
Installing appmode…
Collecting appmode
…
Installing collected packages: appmode
Successfully installed appmode-0.6.0
Adding appmode to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (ea9a56)!
Installing dependencies from Pipfile.lock (ea9a56)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 128/128 — 00:09:58
…
$ pipenv run jupyter nbextension enable --py --sys-prefix appmode
Enabling notebook extension appmode/main...
      - Validating: OK
$ pipenv run jupyter serverextension enable --py --sys-prefix appmode
Enabling: appmode.server_extension
- Writing config: /Users/veit/.local/share/virtualenvs/jupyter-tutorial--q5BvmfG/bin/../etc/jupyter
    - Validating...
      appmode.server_extension  OK
Configuration#
Server-side configuration#
The server can be configured with the following three options:
Appmode.trusted_pathruns the app mode only for notebooks under this path; Default setting: no restrictions.
Appmode.show_edit_buttondisplays button in app mode; Default setting:
True.Appmode.show_other_buttonsshows other buttons in app mode, e.g. ; Default setting:
True.
You can find more information about the server configuration in Jupyter paths and configuration.
Client-side configuration#
The UI elements can also be adapted on the client side in the custom.js file, e.g. with:
// Hides the edit app button.
$('#appmode-leave').hide();
// Hides the kernel busy indicator.
$('#appmode-busy').hide();
// Adds a loading message.
$('#appmode-loader').append('<h2>Loading...</h2>');
Note
Hiding the button does not prevent users from exiting app mode by manually changing the URL.