Skip to main content

No project description provided

Project description

Jupyter React Widget Template

This is a basic repository setup for a React-based jupyter widget, based on the tools I like to use at the moment. There's a lot required to get this all working and there aren't a lot of good references out there, so I made this repo as a reference for myself that I can copy when creating new Jupyter widget packages.

(See the lmk README for more info, all of this info originated from there)

Set up

  • Create virtual environment: python -m venv venv

  • Install dependencies with pnpm install

  • Install the package with `pip install -e '.[dev]'

  • You should be able to run jupyter lab and run the following to see the widget:

from jupyter_notepad.widget import Widget

w = Widget()
w

Enable extension:

Make sure you've installed or run pnpm build:prod first.

  • Jupyter notebook 5.2 and earlier:
jupyter nbextension install --sys-prefix --symlink --overwrite --py lmk
jupyter nbextension enable --sys-prefix --py lmk
  • Jupyterlab:
jupyter labextension develop --overwrite .

Watch (dev mode)

pnpm watch

When this is running, if you make changes to the plugin code reloading the page should be sufficient to see changes.

Linting & formatting

pnpm check

Build python wheel

pnpm build:python
  • TODO: clean up JS dependencies

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

jupyter_notepad-0.0.1.dev4.tar.gz (1.8 MB view hashes)

Uploaded Source

Built Distribution

jupyter_notepad-0.0.1.dev4-py3-none-any.whl (3.3 MB view hashes)

Uploaded Python 3

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