Skip to main content

Python kernel for JupyterLite powered by Pyodide

Project description

jupyterlite-pyodide-kernel

A Python kernel for JupyterLite powered by Pyodide,

ci-badge lite-badge docs-badge

Requirements

  • python >=3.8

Compatibility

With Jupyter

status jupyterlite-pyodide-kernel jupyterlite-core jupyterlab notebook retrolab
pre 0.4.* >=0.4,<0.5 >=4.2.0,<4.3 >=7.2.0,<7.3 -
stable 0.3.* >=0.3,<0.4 >=4.1.1,<4.2 >=7.1.0,<7.2 -
stable 0.2.* >=0.2,<0.3 >=4.0.7,<4.1 >=7.0.5,<8 -
stable 0.1.* >=0.1,<0.2 >=3.5,<3.6 - >=0.3,<0.4

Installing the matching version of JupyterLab with your package manager can help ensure matching labextension assets and kernel dependencies, even though this kernel does not yet work in a full, jupyter_server-hosted client such as JupyterLab or Notebook.

With Pyodide

jupyterlite-pyodide-kernel pyodide python emscripten
>=0.1.0,<=0.1.1 0.23.* 3.10.* 3.1.29
>=0.1.2,<=0.2.1 0.24.* 3.10.* 3.1.45
>=0.2.2,<=0.2.3 0.25.* 3.11.* 3.1.46
>=0.3.*,<=0.4.0 0.25.* 3.11.* 3.1.46
>=0.4.*,<=0.5.0 0.26.* 3.12.* 3.1.58

Note that the Emscripten version is strict down to the bugfix version.

Install

To install the Pyodide kernel labextension and the CLI addons for jupyter lite, run:

pip install jupyterlite-pyodide-kernel

or with conda, mamba, micromamba, etc.

conda install -c conda-forge jupyterlite-pyodide-kernel

For more options see the development install or contributing guide.

Usage

Build a JupyterLite site:

jupyter lite build

Some new CLI options are also available:

jupyter lite --help

This should show something like this:

  --piplite-wheels=<typedtuple-item-1>...
      Local paths or URLs of piplite-compatible wheels to copy and index
      Default: ()
      Equivalent to: [--PipliteAddon.piplite_urls]
  --pyodide=<Unicode>
      Local path or URL of a pyodide distribution tarball
      Default: ''
      Equivalent to: [--PyodideAddon.pyodide_url]

Learn more

⚠️ The documentation for advanced configuration is available from the main JupyterLite documentation site:

Uninstall

To remove the extension, run:

pip uninstall jupyterlite-pyodide-kernel  # or however you installed it

Prerelease Versions

To install pre-release versions with pip:

pip install --upgrade --pre jupyterlite-pyodide-kernel

Or, similarly for the conda ecosystem, for alpha packages:

conda install \
  -c conda-forge/label/jupyterlite_core_alpha \
  -c conda-forge/label/jupyterlite_pyodide_kernel_alpha \
  -c conda-forge \
  jupyterlite-pyodide-kernel

Note: _beta and _rc packages would follow a similar channel naming convention

Development Install

Below is an short overview of getting up and running quickly. Please see the contributing guide for full details.

Development Requirements

Recommended a Python virtual environment provided by a tool of choice, e.g. one of:

  • virtualenv
  • mamba
  • conda

Ensure the local development environment has:

  • git
  • nodejs 20
  • python >=3.8

Development Quick Start

git clone https://github.com/jupyterlite/pyodide-kernel
cd pyodide-kernel
npm run quickstart

Then, serve the built demo site, documentation, and test reports with Python's built-in HTTP server:

jlpm serve

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_pyodide_kernel-0.4.0rc0.tar.gz (504.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file jupyterlite_pyodide_kernel-0.4.0rc0.tar.gz.

File metadata

File hashes

Hashes for jupyterlite_pyodide_kernel-0.4.0rc0.tar.gz
Algorithm Hash digest
SHA256 160c87d87a9fdbd58352cabd975b4555c601aecafb6eae41402c6d74d5903907
MD5 6fc93fb4b6368916649f7da03c70f40c
BLAKE2b-256 86de43f1681ff32bb3c39298f5c98673fcaa55202390c311e19d8e3417596c2e

See more details on using hashes here.

File details

Details for the file jupyterlite_pyodide_kernel-0.4.0rc0-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterlite_pyodide_kernel-0.4.0rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 119c3eb331dcd528544a75357178a83ab4dbadc458d6cb2dd9615caf28a386ac
MD5 c607ac7e1948c0b07644058ad7042d15
BLAKE2b-256 ba767d3a29a4f4d2cb3a4287b98fb41c348551c2c562dd377dca3ebcdebe1bcc

See more details on using hashes here.

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