A terminal for JupyterLite
Project description
jupyterlite-terminal
A terminal for JupyterLite.
⚠️ This extension is still in development and not yet ready for general use. ⚠️
Requirements
- JupyterLite >= 0.4.0
Install
To install the extension, execute:
pip install jupyterlite-terminal
You will also need to install the JupyterLite CLI:
python -m pip install --pre jupyterlite-core
Usage
After installing jupyterlite-core and jupyterlite-terminal, create a jupyter-lite.json file with the following content to activate the terminal extension:
{
"jupyter-lite-schema-version": 0,
"jupyter-config-data": {
"terminalsAvailable": true
}
}
Then build a new JupyterLite site:
jupyter lite build
Deployment
If you would like to deploy a JupyterLite site with the terminal extension, you will need to configure your server to add the Cross-Origin-Embedder-Policy and Cross-Origin-Opener-Policy headers.
As an example, this repository deploys the JupyterLite terminal to Vercel, using the following files:
vercel.json: configure the COOP / COEP server headersdeploy/requirements-deploy.txt: dependencies for the JupyterLite deploymentdeploy/deploy.sh: script to deploy to Vercel, using micromamba to have full control on the Python versions and isolate the build in a virtual environment
For more information, have a look at the JupyterLite documentation: https://jupyterlite.readthedocs.io/
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 jupyterlite_terminal 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
Then build a JupyterLite distribution with the extension installed:
cd deploy
jupyter lite build --contents contents
And serve it either using:
npx static-handler --cors --coop --coep --corp _output/
or:
jupyter lite serve --LiteBuildConfig.extra_http_headers=Cross-Origin-Embedder-Policy=require-corp --LiteBuildConfig.extra_http_headers=Cross-Origin-Opener-Policy=same-origin
The extra HTTP headers are require to ensure that SharedArrayBuffer is available.
Packaging the extension
See RELEASE
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 jupyterlite_terminal-0.1.6.tar.gz.
File metadata
- Download URL: jupyterlite_terminal-0.1.6.tar.gz
- Upload date:
- Size: 768.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
643b183a90200c52f96b97ddebab4d69de6c057da1a4160f9718e5779027a015
|
|
| MD5 |
6ffd0bdbc4f493f9d27aa02e76d728c4
|
|
| BLAKE2b-256 |
353c23b4ca2981928ca391dea21db6a805060bfb3ae551eaa58e9b02cad972da
|
File details
Details for the file jupyterlite_terminal-0.1.6-py3-none-any.whl.
File metadata
- Download URL: jupyterlite_terminal-0.1.6-py3-none-any.whl
- Upload date:
- Size: 107.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f3b5866cb1f14f1d62b7c850234844fbfaf4e8b3d59b31c585b0e6b9ef83ff5
|
|
| MD5 |
61e58d07596edb45c8c1c757b573532a
|
|
| BLAKE2b-256 |
29319d5549d74b8718eea69aec7899afaff361d64c60b19274d48dc456499aee
|