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
%%jsoniqmagic cells within Python notebooks. - Syntax highlighting for
.jqfiles - can be enabled for.jqfiles 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:
-
Clone the repository:
git clone https://github.com/davidbuzatu-marian/jsoniq-jupyterlab.git cd jsoniq-jupyterlab
-
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
-
Build the extension:
uv run pnpm run build:prod
-
Link the extension for local development:
jupyter labextension link .
-
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)
| File | Size | Uploaded | |
|---|---|---|---|
| jsoniq_jupyterlab_extension-2.0.0.tar.gz | 487.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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