Jupyter Offline Notebook
Save and load notebooks to browser storage, even if you've lost your connection to the server.
Installation
pip install jupyter-offlinenotebook
This should automatically enable the extension on Jupyter Notebook and JupyterLab.
This extension supports JupyterLab 3 and 4, and NBclassic. Use version 0.2.2 for JupyterLab 2 and Notebook <7.
Usage
You should see up to five new buttons depending on your configuration and where you are running the notebook:
- download the in-memory (browser) state of the notebook
- save the in-memory state of the notebook to local-storage
- load a notebook from local-storage
- open the permanent URL of the repository containing this notebook
- copy the permanent mybinder URL to share this repository
Saving and loading uses the repository ID and the path of the current notebook.
You should always see the Download button.
If you are running this on mybinder all buttons should be visible.
See the configuration section below to enable the other buttons on other systems.
If you don't see the buttons check the Javascript console log.
See example.ipynb
Configuration
This extension can be configured in jupyter_notebook_config.py by setting the following properties of c.OfflineNotebookConfig:
repository_id: A callable that returns the repository ID. This is used when storing and retrieving notebooks. Default is the value of theBINDER_REPO_URLenvironment variable.repository_ref_url: A callable that returns the repository reference URL. Default is the value of theBINDER_REF_URLenvironment variable.binder_persistent_url: A callable that returns the repository reference URL. Default is the values of theBINDER_LAUNCH_HOSTandBINDER_PERSISTENT_REQUESTenvironment variables.binder_repo_label: A callable that returns the label used to link to the repository.
Warning
This extension is still in development. It is only tested on Firefox. Breaking changes may occur in future.
There are several major limitations including:
- Local-storage is limited by quotas imposed by the browser.
- A repository ID and path of the notebook within Jupyter Notebook are used, joined by a
. This may change in future.
Development notes
This extension stores notebooks in browser storage using the IndexedDB API, wrapped with Dexie.js.
One server API call is made during initialisation to obtain the storage configuration. Everything else is done client-side so should work even if the server is disconnected.
The CI pipeline builds the extension with JupyterLab 4, but the build package works with JupyterLab 3 and NBclassic. Install the development dependencies:
pip install -r dev-requirements-jl4.txt
To build and install the development version:
pip install .
This automatically runs jlpm.
The notebook and server extensions should be automatically enabled.
JupyterLab 3+ supports the installation of extensions as a static package so no further steps are required.
Tagged releases of this repository are automatically published to PyPI and NPM.
To test that the binder and repo buttons work when developing locally set some placeholder environment variables, e.g.:
BINDER_LAUNCH_HOST=http://localhost BINDER_REPO_URL=http://localhost BINDER_PERSISTENT_REQUEST=v2/gh/repo BINDER_REF_URL=http://localhost jupyter-lab --debug
If you make any changes remember to run all linters and auto-formatters:
pre-commit run -ajlpm run format
Metadata
Release files for jupyter-offlinenotebook 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jupyter_offlinenotebook-0.3.2.tar.gz | 295.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jupyter_offlinenotebook-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 670.8 kB
Release files / jupyter_offlinenotebook-0.3.2.tar.gz
| Download URL | jupyter_offlinenotebook-0.3.2.tar.gz |
|---|---|
| Size | 295.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ad657fe8fc3b63bc80f4c2920462bb734146878b473445a65eadd5623abf03a
|
|
BLAKE2b-256 checksum How to use checksums |
6cd6684ee03472f504f9266914318436b259c496a81ec9f39d31d56574e2e39a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2025.
Transparency logRelease files / jupyter_offlinenotebook-0.3.2-py3-none-any.whl
| Download URL | jupyter_offlinenotebook-0.3.2-py3-none-any.whl |
|---|---|
| Size | 375.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac967aa6e1a98c39083571acb7a29369882aae79a403659091a2b467f07d9486
|
|
BLAKE2b-256 checksum How to use checksums |
e97b832cc04fdf1294dc550ff4042c9172a6fe81798229d7b1b6f7417eb7199d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2025.
Transparency log