Skip to main content

JSONiq JupyterLab Extension

jsoniq-jupyterlab-extension is a JupyterLab extension that adds basic token highlighting for JSONiq code. Syntax highlighting with CodeMirror is enabled for jsoniq cells using the %%jsoniq magic and for .jq files.

Features

  • Basic token highlighting - provides JSONiq token highlighting for %%jsoniq magic cells within Python notebooks.
  • Syntax highlighting for .jq files - can be enabled for .jq files using the Jupyter language selector.

Installation

Install the extension from Python packaging. No npm or yarn installation is required for users.

To install, run:

pip install jsoniq-jupyterlab-extension

After installing the package, you may need to enable the extension in JupyterLab:

jupyter labextension enable jsoniq-jupyterlab-extension

Usage

Once the extension is installed and enabled, it automatically recognizes jsoniq magic cells and files for syntax highlighting.

Example

%%jsoniq
for $book in json-file("books.json")
where $book.price lt 20
return $book.title

This cell should become highlighted.

Development

To contribute to the development of jsoniq-jupyterlab, follow these steps:

  1. Clone the repository:

    git clone https://github.com/davidbuzatu-marian/jsoniq-jupyterlab.git
    cd jsoniq-jupyterlab
    
  2. Install dependencies:

    pnpm install         # Install JavaScript dependencies
    pnpm run antlr4      # Generate parser from grammar
    uv python install    # Setup Python environment using uv
    uv sync              # Sync dependencies for Python environment
    
  3. Build the extension:

    uv run pnpm run build:prod
    
  4. Link the extension for local development:

    jupyter labextension link .
    
  5. Launch JupyterLab:

    jupyter lab
    

Building and testing the extension

To build the project for production, the following commands build the JavaScript files, build the Jupyter extension and install this result for local testing.

uv run pnpm run build:prod

Project Structure

  • src/: Contains the source code of the extension.
  • dist/: Build artifacts for the extension.
  • package.json: Contains the configuration and dependencies for the extension.
  • tests/: Contains a set of tests relating to syntax highlighting.

Contributing

We welcome contributions to the jsoniq-jupyterlab-extension project! If you have any suggestions, bug reports, or pull requests, please feel free to submit them on the GitHub repository.

License

This project is licensed under the Apache-2.0 License. See the LICENSE file for details.

Release files for jsoniq-jupyterlab-extension 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jsoniq-jupyterlab-extension 2.0.0
File Size Uploaded
jsoniq_jupyterlab_extension-2.0.0.tar.gz 487.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jsoniq-jupyterlab-extension 2.0.0
File Interpreter ABI Platform
jsoniq_jupyterlab_extension-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 721.9 kB

Release files / jsoniq_jupyterlab_extension-2.0.0.tar.gz

Download URL jsoniq_jupyterlab_extension-2.0.0.tar.gz
Size 487.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e75c537b18c24c3be69f159e19c243d7f90324db9e37e0c60c8decc592e519c5
BLAKE2b-256 checksum
How to use checksums
e367bd1291460393b2b6df264bca1e06c2136321cf8de7627bd99537aca86a10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release files / jsoniq_jupyterlab_extension-2.0.0-py3-none-any.whl

Download URL jsoniq_jupyterlab_extension-2.0.0-py3-none-any.whl
Size 234.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67cc0a5e2f3f01164612c57813831d62b28b205615367e1443834d27dbab23f5
BLAKE2b-256 checksum
How to use checksums
a110716592db402c55bf3b3546e2d8378c1556ca8022fbc494bde8b4033833b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.1.2

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page