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.
Try it live
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
tobaseurl/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:
- Install Docker.
- git clone this repository
docker build --tag appmode_dev ./
docker run --init -ti -p8888:8888 appmode_dev
- Browse to
http://localhost:8888/apps/example_app.ipynb
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file appmode-aiidalab-0.4.0.tar.gz
.
File metadata
- Download URL: appmode-aiidalab-0.4.0.tar.gz
- Upload date:
- Size: 13.3 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | de3cb6e3b9e366d66e8ad06084e8d77aae5041e8771d021fb44bb84a766db3d8 |
|
MD5 | 9918b2ae45395374bc96e360a351a5bc |
|
BLAKE2b-256 | e2189409188e7d502942e3fdaf2e38d383d6624099996a9adf97c65aa4529274 |
File details
Details for the file appmode_aiidalab-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: appmode_aiidalab-0.4.0-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 966d8f3109b7830bc6eb4b82c66be8aa66d34664abdad5ad1890cbc92513fa7b |
|
MD5 | f7cce829bc71f03d5164a02467f68990 |
|
BLAKE2b-256 | 9c90ee732d061a9f7a30a459ec13e593c28bbcff6d7be1af3ad66c493270b33a |
File details
Details for the file appmode_aiidalab-0.4.0-py2-none-any.whl
.
File metadata
- Download URL: appmode_aiidalab-0.4.0-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99c2d1e510c135475e7b7047ab9bc0664461ea5843341a061ff31c651efdc75a |
|
MD5 | 6b786f633a1a841dc4005d8c011718d5 |
|
BLAKE2b-256 | 9968a2487306e178c7a8860412dcd2a1e4d659bdb345fbce7823b978848cf567 |