Skip to main content

A terminal for JupyterLite

Project description

jupyterlite-terminal

Github Actions Status lite-badge

A terminal for JupyterLite.

⚠️ This extension is still in development and not yet ready for general use. ⚠️

a screenshot showing a terminal running in JupyterLite

Requirements

  • JupyterLite >= 0.6.0

Install

To install the extension, execute:

pip install jupyterlite-terminal

You will also need to install the JupyterLite CLI:

python -m pip install 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

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 _output/

or:

jupyter lite serve

To enable use of SharedArrayBuffer rather than ServiceWorker for stdin you will have to configure your server to add the Cross-Origin-Embedder-Policy and Cross-Origin-Opener-Policy headers. Do this using either:

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

Packaging the extension

See RELEASE

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

jupyterlite_terminal-0.2.2.tar.gz (795.5 kB view details)

Uploaded Source

Built Distribution

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

jupyterlite_terminal-0.2.2-py3-none-any.whl (87.5 kB view details)

Uploaded Python 3

File details

Details for the file jupyterlite_terminal-0.2.2.tar.gz.

File metadata

  • Download URL: jupyterlite_terminal-0.2.2.tar.gz
  • Upload date:
  • Size: 795.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for jupyterlite_terminal-0.2.2.tar.gz
Algorithm Hash digest
SHA256 7f4ea204e6c8fcb77e69ec3bc1a2c27cdcef28de55f054608b48316eb8548925
MD5 a75c632acd4333f4e8edafa26921f38a
BLAKE2b-256 0759a629b612a49728dee9545c8371f7933a1c157752f35d6640ed1c62c6cac1

See more details on using hashes here.

File details

Details for the file jupyterlite_terminal-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterlite_terminal-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d754ddd2b1521a4e66ac16190d0f2b2d8a945d35535f7267b196d50ed7abb42a
MD5 8eaf74cb054672521d04aaadd0aa1e0d
BLAKE2b-256 2fc6f2da5779c622b761c1193c70b656ec5d43d0c25ece69f1022a77796d8dfe

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