Skip to main content

ggsql Jupyter Kernel

A Jupyter kernel for executing ggsql queries with rich inline visualizations.

Overview

The ggsql Jupyter kernel enables you to run ggsql queries directly in Jupyter notebooks, with plots rendered in the kernel and delivered as images. It maintains a persistent DuckDB session across cells, allowing you to build up datasets and create visualizations interactively.

Features

  • Execute ggsql queries in Jupyter notebooks
  • Rich visualizations rendered in the kernel and shown inline
  • Persistent DuckDB session across cells
  • Pure SQL support with HTML table output
  • Grammar of Graphics syntax for declarative visualization

Installation

Prerequisites

  • Jupyter Lab or Notebook installed

The easiest way to install the ggsql kernel is from PyPI. This provides pre-built binaries for Linux, macOS, and Windows.

Using pip:

pip install ggsql-jupyter
ggsql-jupyter --install

Using uv:

uv tool install ggsql-jupyter
ggsql-jupyter --install

The --install flag registers the kernel with Jupyter. It automatically detects and respects your current environment (virtualenv, conda, uv, etc.).

Option 2: Install from crates.io

Requires a Rust toolchain:

cargo install ggsql-jupyter
ggsql-jupyter --install

Option 3: Download Pre-built Binary

Pre-built binaries are available from GitHub Releases:

Platform Binary
Linux (x86_64) ggsql-jupyter-linux-x64
Linux (ARM64) ggsql-jupyter-linux-arm64
macOS (Intel) ggsql-jupyter-macos-x64
macOS (Apple Silicon) ggsql-jupyter-macos-arm64
Windows (x64) ggsql-jupyter-windows-x64.exe

After downloading, make it executable and install:

chmod +x ggsql-jupyter-*
./ggsql-jupyter-linux-x64 --install

On Windows (PowerShell):

.\ggsql-jupyter-windows-x64.exe --install

Option 4: Build from Source

Requires a Rust toolchain. From the workspace root:

cargo build --release --package ggsql-jupyter
./target/release/ggsql-jupyter --install

Installation Flags

  • --install: Install the kernel (default: user install)
  • --install --user: Explicitly install for current user
  • --install --sys-prefix: Install into sys.prefix (for conda envs)

Verify Installation

jupyter kernelspec list

You should see ggsql in the list of available kernels.

Usage

Start Jupyter

jupyter lab
# or
jupyter notebook

Create a ggsql Notebook

  1. In Jupyter, click "New" and select "ggsql" from the dropdown
  2. Start writing ggsql queries!

Example Queries

Simple Point Plot

SELECT 1 as x, 2 as y, 'A' as category
UNION ALL
SELECT 2, 4, 'A'
UNION ALL
SELECT 3, 3, 'B'

VISUALISE x, y, category AS color
DRAW point

Time Series

SELECT
    '2024-01-01'::DATE + INTERVAL (n) DAY as date,
    n * 10 as revenue
FROM generate_series(0, 30) as t(n)

VISUALISE date AS x, revenue AS y
DRAW line
SCALE x
  SETTING type => 'date'
LABEL title => 'Revenue Growth', x => 'Date', y => 'Revenue ($)'

Multi-Layer Plot with Global Mapping

SELECT x, x*x as y, x*x*x as z
FROM generate_series(1, 10) as t(x)

VISUALISE x AS x
DRAW line
  MAPPING y AS y
DRAW line
  MAPPING z AS y
LABEL title => 'Polynomial Functions'

Pure SQL (Data Tables)

SELECT * FROM (VALUES (1, 'a'), (2, 'b'), (3, 'c')) AS t(id, name)

This will display as an HTML table without visualization.

Building Up Data Across Cells

Cell 1:

CREATE TABLE products AS
SELECT * FROM (VALUES
  (1, 'Widget', 10.99),
  (2, 'Gadget', 24.99),
  (3, 'Doohickey', 5.99)
) AS t(id, name, price)

Cell 2:

SELECT * FROM products
VISUALISE name AS x, price AS y
DRAW bar
LABEL title => 'Product Prices', y => 'Price ($)'

Metadata

Release files for ggsql-jupyter 0.5.2

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

Source distribution (sdist)

Source distribution for ggsql-jupyter 0.5.2
File Size Uploaded
ggsql_jupyter-0.5.2.tar.gz 1.5 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for ggsql-jupyter 0.5.2
File
ggsql_jupyter-0.5.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
ggsql_jupyter-0.5.2-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
ggsql_jupyter-0.5.2-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details
ggsql_jupyter-0.5.2-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
ggsql_jupyter-0.5.2-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 113.4 MB

Release files / ggsql_jupyter-0.5.2.tar.gz

Download URL ggsql_jupyter-0.5.2.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
ec0a3a22b409a1c5cf188bb7ac2e5ff8640792176befb88305b5a4ef5e2cace9
BLAKE2b-256 checksum
How to use checksums
71078bfb31fbf762f4ca827d501b5726c59a429faa33f088649337ad3c9d6d3c
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 Sep 11, 2026.

Transparency log

Release files / ggsql_jupyter-0.5.2-py3-none-win_amd64.whl

Download URL ggsql_jupyter-0.5.2-py3-none-win_amd64.whl
Size 20.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
3c1d7783027bf062dbb51c8a641ad94135904ac5ebd807e8f83733f2e9e9972a
BLAKE2b-256 checksum
How to use checksums
6ef3a7ce01623e77eae251c3aba17c55e800b777bbb545d0ce8c5b0d4239f4da
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 Sep 11, 2026.

Transparency log

Release files / ggsql_jupyter-0.5.2-py3-none-manylinux_2_28_x86_64.whl

Download URL ggsql_jupyter-0.5.2-py3-none-manylinux_2_28_x86_64.whl
Size 25.2 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
a056e9a5a046fea4024301517397087e71f7f05b225864758598420b3074a7e1
BLAKE2b-256 checksum
How to use checksums
e384c9e6b51851b71c3cbbd6213cdfd68e3005973bcdaa6e3abda31dd96ed950
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 Sep 11, 2026.

Transparency log

Release files / ggsql_jupyter-0.5.2-py3-none-manylinux_2_28_aarch64.whl

Download URL ggsql_jupyter-0.5.2-py3-none-manylinux_2_28_aarch64.whl
Size 22.9 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
a15bd9d3ec086b934ca45d2edc7916ec4f536b5c5da59f0ca3f3bc2c2ca516de
BLAKE2b-256 checksum
How to use checksums
7c6f40f81319b9cb1db1d52e5af7a9d7e93af88458621588e2844be19f0602a9
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 Sep 11, 2026.

Transparency log

Release files / ggsql_jupyter-0.5.2-py3-none-macosx_11_0_arm64.whl

Download URL ggsql_jupyter-0.5.2-py3-none-macosx_11_0_arm64.whl
Size 20.4 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7f283cc245a9e856d34b498e293f2275ce01d1e73538364b1c9ec1231a883b40
BLAKE2b-256 checksum
How to use checksums
7c54018cecc5dbe2630085299d30d52e26c5169525cc1a58faa479583e8a2cdc
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 Sep 11, 2026.

Transparency log

Release files / ggsql_jupyter-0.5.2-py3-none-macosx_10_12_x86_64.whl

Download URL ggsql_jupyter-0.5.2-py3-none-macosx_10_12_x86_64.whl
Size 22.4 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
38e81d102717d2120dfbf7949e206133aea5b2fde1f50810bb06b99ac41c49ca
BLAKE2b-256 checksum
How to use checksums
cc95d4b29d8b88c201a38bca6241edc6e55724a26beaca1203e83ac06969d0a3
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 Sep 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.2 This release

6 release files

0.5.1

6 release files

0.5.0

6 release files

0.4.1

6 release files

0.3.3

6 release files

0.3.2

6 release files

0.3.1

6 release files

0.3.0

6 release files

0.2.7

6 release files

0.2.6

6 release files

0.2.5

6 release files

0.1.9

6 release files

0.1.8

6 release files

0.1.7

6 release files

0.1.6

6 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