Skip to main content

A JupyterLab Drive to save files in the browser storage

Project description

jupyterlab-browser-storage

Github Actions Status

A JupyterLab Drive to save files in the browser storage.

[!WARNING] This is still a work-in-progress and some functionalities are not yet working as expected.

Context

This extension originates from the JupyterLite contents manager.

Requirements

  • JupyterLab >= 4.0.0

Install

To install the extension, execute:

pip install jupyterlab_browser_storage

Programmatic Usage

The package can also be used as a library when only the drive implementation is needed:

import { BrowserStorageDrive } from 'jupyterlab-browser-storage';
import localforage from 'localforage';

const drive = new BrowserStorageDrive({ localforage });

The root package export (jupyterlab-browser-storage) still provides the JupyterLab plugin as the default export.

Uninstall

To remove the extension, execute:

pip uninstall jupyterlab_browser_storage

Contributing

Development install

Note: You will need NodeJS to build the extension package.

The jlpm command is JupyterLab's pinned version of yarn that is installed with JupyterLab. You may use yarn or npm in lieu of jlpm below.

# Clone the repo to your local environment
# Change directory to the jupyterlab_browser_storage directory
# Install package in development mode
pip install -e "."
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm build

You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.

# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm watch
# Run JupyterLab in another terminal
jupyter lab

With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).

By default, the jlpm build command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:

jupyter lab build --minimize=False

Development uninstall

pip uninstall jupyterlab_browser_storage

In development mode, you will also need to remove the symlink created by jupyter labextension develop command. To find its location, you can run jupyter labextension list to figure out where the labextensions folder is located. Then you can remove the symlink named jupyterlab-browser-storage within that folder.

Testing the extension

Integration tests

This extension uses Playwright for the integration tests (aka user level tests). More precisely, the JupyterLab helper Galata is used to handle testing the extension in JupyterLab.

More information are provided within the ui-tests README.

Packaging the extension

See RELEASE

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

jupyterlab_browser_storage-0.1.1.tar.gz (174.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jupyterlab_browser_storage-0.1.1-py3-none-any.whl (47.5 kB view details)

Uploaded Python 3

File details

Details for the file jupyterlab_browser_storage-0.1.1.tar.gz.

File metadata

File hashes

Hashes for jupyterlab_browser_storage-0.1.1.tar.gz
Algorithm Hash digest
SHA256 23836a5600c402ff7bc111c358beccb76b15498844d8bfc0d465c3153ee8a8e4
MD5 344e34805563632f174d3881f9bc79fd
BLAKE2b-256 6618dbab4a917a40e32f99cda4e0d03f2f52f7c7dbe2d67b5a3b3392da60ae2c

See more details on using hashes here.

File details

Details for the file jupyterlab_browser_storage-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterlab_browser_storage-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ad51be0bb6140cfe48e44a5fee3848e408199e28847543330ca5a2c6a999fb93
MD5 b5b699aca5ae310bb762619c27f68629
BLAKE2b-256 3aabf03bc9d470eb46ae61c2e026ee13582e2c5f3148aa2950289b6353a0bf8e

See more details on using hashes here.

Supported by

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