Skip to main content

A Jupyter extensions that turns notebooks into web applications, with modifications for AiiDA lab.

Project description

Appmode

A Jupyter extensions that turns notebooks into web applications.

screenshots

Try it live

Binder

Click the binder badge to try it live without installing anything. This will take you directly to the "app" version of the notebook.

Installation

If you use conda, you can install it as:

conda install --channel conda-forge appmode

If you use pip, you can install it as:

pip install appmode
jupyter nbextension     enable --py --sys-prefix appmode
jupyter serverextension enable --py --sys-prefix appmode

If you want to use mybinder add the following environment.yml file to your repository:

channels:
  - conda-forge
dependencies:
  - appmode

Description

Appmode consist of a server-side and a notebook extension for Jupyter. Together these two extensions provide the following features:

  • One can view any notebook in appmode by clicking on the Appmode button in the toolbar. Alternatively one can change the url from baseurl/notebooks/foo.ipynb to baseurl/apps/foo.ipynb. This also allows for direct links into appmode.

  • When a notebook is opened in appmode, all code cells are automatically executed. In order to present a clean UI, all code cells are hidden and the markdown cells are read-only.

  • A notebook can be opened multiple times in appmode without interference. This is achieved by creating temporary copies of the notebook for each active appmode view. Each appmode view has its dedicated ipython kernel. When an appmode page is closed the kernel is shutdown and the temporary copy gets removed.

  • To allow for passing information between notebooks via url parameters, the current url is injected into the variable jupyter_notebook_url.

Customization

The UI elements of Appmode can be customized via the custom.js file. Some examples are:

$('#appmode-leave').hide();                          // Hides the edit app button.
$('#appmode-busy').hide();                           // Hides the kernel busy indicator.
$('#appmode-loader').append('<h2>Loading...</h2>');  // Adds a loading message.

Beware that hiding the edit button does not prevent users from leaving Appmode by changing the URL manually.

Development

With the included Dockerfile a development environment can be quickly created:

  1. Install Docker.
  2. git clone this repository
  3. docker build --tag appmode_dev ./
  4. docker run --init -ti -p8888:8888 appmode_dev
  5. Browse to http://localhost:8888/apps/example_app.ipynb

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

appmode-aiidalab-0.4.0.1.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

appmode_aiidalab-0.4.0.1-py2-none-any.whl (20.1 kB view details)

Uploaded Python 2

File details

Details for the file appmode-aiidalab-0.4.0.1.tar.gz.

File metadata

  • Download URL: appmode-aiidalab-0.4.0.1.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.2

File hashes

Hashes for appmode-aiidalab-0.4.0.1.tar.gz
Algorithm Hash digest
SHA256 bfcaee53fab2bcdc9caad98e02ffff48deffd67fc33b455db25ffbe4950bbfbf
MD5 d35273a32c8daecd8360e2462c84a3bc
BLAKE2b-256 5dbc3042dc6290ca04c1712eed9887c73a6e8d65c70d5e4e0d3969f284d01372

See more details on using hashes here.

File details

Details for the file appmode_aiidalab-0.4.0.1-py2-none-any.whl.

File metadata

  • Download URL: appmode_aiidalab-0.4.0.1-py2-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.2

File hashes

Hashes for appmode_aiidalab-0.4.0.1-py2-none-any.whl
Algorithm Hash digest
SHA256 f24b48a291f1204de28bcc72cf2074f5e70f2dc360c597f6054fef36a64b6fdc
MD5 f23fc2a9a677e88837ae6bc3c9322168
BLAKE2b-256 28d6e66b76b41b9fce6cc6401e35edd2b1cd9e044659e76b0d9c233aea4ccbc9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page