Skip to main content

Jupyter Builder

Jupyter Builder Tests version on npm version on PyPI version on conda-forge

Build tools for JupyterLab extensions — extracted from the core JupyterLab codebase to be maintained and used independently.

Installation

pip install jupyter_builder

CLI

build

Compile the extension JavaScript assets for consumption by a Jupyter app.

jupyter-builder build <path/to/extension>

develop

Install extension assets in development mode (analogous to pip install -e). Uses a symlink by default.

jupyter-builder develop <path/to/extension>

watch

Automatically rebuild development assets when source files change.

jupyter-builder watch <path/to/extension>

For advanced configuration, see the Advanced section for available flags.

jlpm

jupyter-builder ships jlpm, a Jupyter-aware Node.js package manager wrapper:

jlpm install
jlpm build

Advanced

CLI flags

build
Flag Description
--development Build in development mode (default: False)
--source-map Generate source maps (default: False)
--static-url=<url> Set the URL for static assets
--core-version=<version> JupyterLab core version to build against
--core-package-file=<path> Path to a core application package.json (overrides --core-version)
develop
Flag Description
--overwrite Overwrite existing files
--user Install to the user's directory
--sys-prefix Install under sys.prefix (default: True)
--labextensions-dir=<path> Install to a custom labextensions directory
watch
Flag Description
--development Build in development mode (default: True)
--source-map Generate source maps (default: False)
--core-version=<version> JupyterLab core version to build against
--core-package-file=<path> Path to a core application package.json (overrides --core-version)

Python API

from jupyter_builder.federated_extensions import (
    build_labextension,
    develop_labextension_py,
    watch_labextension,
)

build_labextension(
    "/path/to/extension",
    development=False,
    source_map=False,
    static_url=None,
    core_version=None,
    core_package_file=None,
)

develop_labextension_py(
    "/path/to/extension",
    overwrite=True,
    symlink=True,
    user=False,
    sys_prefix=True,
)

watch_labextension(
    "/path/to/extension",
    labextensions_path=[...],
    development=True,
    source_map=False,
)

Environment variables

jupyter-builder supports the following environment variables to override network URLs — for example, to point at an internal mirror or a local proxy. A warning is emitted at startup whenever a variable is set.

Variable Default Purpose
JPBLD_NPM_URL https://registry.npmjs.org npm registry used to resolve and download @jupyterlab/core-meta
JPBLD_RAW_GITHUB_URL https://raw.githubusercontent.com Raw GitHub content URL used as a fallback when npm is unavailable

Example — redirect to a corporate npm mirror:

export JPBLD_NPM_URL=https://npm.internal.example.com
jupyter-builder build /path/to/extension

Core metadata resolution order

When no explicit --core-version is given, jupyter-builder looks for @jupyterlab/core-meta in the extension's node_modules first (no network required). If the package is not found there a warning is printed and the metadata is fetched from the npm registry, falling back to raw GitHub if npm is unreachable.

Uninstall

pip uninstall jupyter_builder

Credits

This package was initially created during GSoC 2024 by @cronan03, mentored by @fcollonval.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyter_builder-1.2.0.tar.gz (976.3 kB view details)

Uploaded Source

Built Distribution

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

jupyter_builder-1.2.0-py3-none-any.whl (914.5 kB view details)

Uploaded Python 3

File details

Details for the file jupyter_builder-1.2.0.tar.gz.

File metadata

  • Download URL: jupyter_builder-1.2.0.tar.gz
  • Upload date:
  • Size: 976.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for jupyter_builder-1.2.0.tar.gz
Algorithm Hash digest
SHA256 e62ed4a7e224c73197dd76974754c93070c9f0451ca450a2c81126838b00f866
MD5 6cca56050bc9a8a1bca4c1605aa25749
BLAKE2b-256 9c764696d0d0b6903e96ba4f959427c7aad985015dd2726e643eadee2a1eec72

See more details on using hashes here.

File details

Details for the file jupyter_builder-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: jupyter_builder-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 914.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for jupyter_builder-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c8a003714a118ebb590f79b459e1e384dee7dce9aebaa86ace045f5960997fe4
MD5 3279c1e0dc8fd99bbdc82a5f5ccd2c62
BLAKE2b-256 4b05a0ac568fa8dfff7c697545956990f7aa222f59d6ec50f21a91170e24a69b

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 Sentry Error logging StatusPage Status page