Skip to main content

JupyterLab extension adding data visualisation widgets.

Project description

Jupyter ProtoPype: jppype

PyPI version

Jupyter extensions adding ipywidgets specialized for data-view. It is designed as a frontend for ProtoPype (to be released) but can be used as a standalone.

The widgets work both with Jupyter Notebook and Jupyter Lab.

Installation

To install use pip:

pip install jppype==0.2.0a3

Cv2 is required by jppype but is not listed in the package dependencies (to prevent version conflicts). You can install it with:

pip install opencv-python-headless

Usage

Import jppype in your notebook and use the widgets:

import jppype as jpp

2D image viewer

viewer = jpp.View2D()

# Supported image formats: numpy array, torch tensor
image = np.random.rand(100, 100) 
viewer.add_image(image)
viewer

Features coming...

  • Widgets

    • 2D image viewer
      • Color images layer
      • Label layer
      • Graph layer
      • Vector Field layer
    • Table viewer
  • Python interactivity

    • Add/Update/Remove layers
    • Callback on click
    • Async request of user selection (point, area, node, edge...)

Development Installation

Pull the latest version of the repository

git clone https://github.com/gabriel-lepetitaimon/jppype.git
cd jppype

For a development installation (requires Node.js and Yarn version 1):

conda create -n jppype python
conda install -c conda-forge yarn nodejs

Download the npm dependencies:

cd ts-src
npm install
cd ..

Upgrade jupyter-lab to version 4.0.0 if necessary:

pip install -U jupyterlab

Install the python package and the extensions in development mode (this stage may take a while as it will build the jupyterlab extension):

pip install -e .[dev,build]
jupyter nbextension install --py --symlink --overwrite --sys-prefix jppype
jupyter nbextension enable --py --sys-prefix jppype

If you which to develop for JupyterLab, also run the command:

jupyter labextension develop --overwrite jppype

Then you need to rebuild the JS when you make a code change:

cd ts-src
jlpm clean
jlpm build

or automatically rebuild when a file changes:

cd ts-src
npm watch

You then need to refresh the JupyterLab page when your javascript changes.

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

jppype-0.2.0a4.tar.gz (323.0 kB view details)

Uploaded Source

Built Distribution

jppype-0.2.0a4-py3-none-any.whl (337.6 kB view details)

Uploaded Python 3

File details

Details for the file jppype-0.2.0a4.tar.gz.

File metadata

  • Download URL: jppype-0.2.0a4.tar.gz
  • Upload date:
  • Size: 323.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for jppype-0.2.0a4.tar.gz
Algorithm Hash digest
SHA256 11e847a0c103efac1b351aa25686c94916516ea9dedeee8a65f789fb4cfbd5bb
MD5 338bb71eeb9fdd56d01eae127fc9df63
BLAKE2b-256 861c6c4159c64099d121b776d7da71bc52708d6ea113d963ac1062929da7ab86

See more details on using hashes here.

Provenance

File details

Details for the file jppype-0.2.0a4-py3-none-any.whl.

File metadata

  • Download URL: jppype-0.2.0a4-py3-none-any.whl
  • Upload date:
  • Size: 337.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for jppype-0.2.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 642297f2e3de02192ba9b24b54c5e256a4fea85629be9c555538227a88045800
MD5 f89f18b5cca132c44a8a7e8d75f07826
BLAKE2b-256 583b358a0bc2b77a6cc1ba693ab8d25cd5cc089d976c2816eb8f2e9c1e00d5a0

See more details on using hashes here.

Provenance

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