Skip to main content

A JupyterLab extension for serving web app.

Project description

jupyterpack

Github Actions Status Try on lite

A JupyterLite extension to serve in-browser Python and Javascript web application

Features

  • Python Web Apps: Serve Python web applications directly in the browser using JupyterLite's in-browser Python kernel. jupyterpack currently supports Dash.
  • JavaScript Web Apps: Bundle and serve JavaScript web applications using in-browser bundlers.

Image

Installation

You can install jupyterpack using pip or conda

# Install using pip
pip install jupyterpack

# Install using conda
conda install -c conda-forge jupyterpack

Usage

To use jupyterpack, you need to create a .spk file that defines your web application. Here's an example structure of a React application:

my_app/
├── app.spk
├── App.js         # Your JS code
├── package.json   # Your JS dependencies
└── index.html      # HTML entry for JS apps

the app.spk is the entry point of your React app, it should contain the following content:

{
  "name": "React Example",
  "entry": "/index.html",
  "framework": "react"
}

Double clicking the spk file to open the web app as a tab of JupyterLab.

Dash application

Same as the React application, here is the structure of a Dash application:

my_app/
├── app.spk
├── server.py         # Your Dash code

the app.spk is the entry point of your Dash app, it should contain the following content:

{
  "name": "Dash Example",
  "entry": "server.py",
  "framework": "dash"
}

For the Dash code, you need to define your Dash app variable as app and do not call app.run_server directly, jupyterpack will handle the server for you. Just as the case of React app, double clicking the spk file will open the Dash app in a new JupyterLab tab.

Try it online!

You can try it online by clicking on this badge:

Try on lite

License

jupyterpack is licensed under the BSD-3-Clause license.

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

jupyterpack-0.3.0.tar.gz (193.4 kB view details)

Uploaded Source

Built Distribution

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

jupyterpack-0.3.0-py3-none-any.whl (112.2 kB view details)

Uploaded Python 3

File details

Details for the file jupyterpack-0.3.0.tar.gz.

File metadata

  • Download URL: jupyterpack-0.3.0.tar.gz
  • Upload date:
  • Size: 193.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for jupyterpack-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ce47fb390e4de414c9553e1035b4f70857d104867010ed12afe5661b77f178bb
MD5 36b07b2076c0ccdfae6ba4ac9c51870b
BLAKE2b-256 67a237e07240149d4e0474f32e9f3bc635fbd8a03dfebd96844cc69069037c9e

See more details on using hashes here.

File details

Details for the file jupyterpack-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: jupyterpack-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 112.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for jupyterpack-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 411c880b1a8a6b9935bc44cc5915d0ddd8d32b4378f9856df5ce008ac98fac92
MD5 6f0ea9b6e3333fdfad9fffb0842d7b6f
BLAKE2b-256 8dc360347023978ac7fc6f6ffd213a52ab55edcbdcf5dd4f50f854f3a26931b3

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