A JupyterLab extension for serving web app.
Project description
jupyterpack
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.
jupyterpackcurrently supports Dash. - JavaScript Web Apps: Bundle and serve JavaScript web applications using in-browser bundlers.
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:
License
jupyterpack is licensed under the BSD-3-Clause license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jupyterpack-0.2.1.tar.gz.
File metadata
- Download URL: jupyterpack-0.2.1.tar.gz
- Upload date:
- Size: 174.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5be92e6b903b21419fa5c390f94ccfe6a125fafba22e59a60bfbd101264ef90b
|
|
| MD5 |
83b781326d737ef75b11f9f08fc9c4bd
|
|
| BLAKE2b-256 |
857be7337a11bcff9735f2c74adf5cec6679bb7ef80424b322bfe6d05d3053ed
|
File details
Details for the file jupyterpack-0.2.1-py3-none-any.whl.
File metadata
- Download URL: jupyterpack-0.2.1-py3-none-any.whl
- Upload date:
- Size: 103.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
665a140d182270a4743f7d65fc776e2caf8c533647abe298b3c5cd885ef373f0
|
|
| MD5 |
2ba8dff40ce65db6c960253946c1cf8f
|
|
| BLAKE2b-256 |
a1bb754cf5ced88335a4f3f9a712c4f48b222fcd732bc000fe260edd1f5e0427
|