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.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 ggsql-jupyter 0.5.0
File Size Uploaded
ggsql_jupyter-0.5.0.tar.gz 1.5 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for ggsql-jupyter 0.5.0
File
ggsql_jupyter-0.5.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
ggsql_jupyter-0.5.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
ggsql_jupyter-0.5.0-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details
ggsql_jupyter-0.5.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
ggsql_jupyter-0.5.0-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.0.tar.gz

Download URL ggsql_jupyter-0.5.0.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
1ea87725f52795563a32278144729a23756533d17272d4166c947bab418fa2b1
BLAKE2b-256 checksum
How to use checksums
53fcc2c1f595cad5b2a4402b1c89cf7ed6dc3f7059e7a95c9df42ffa6c00a403
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.0-py3-none-win_amd64.whl

Download URL ggsql_jupyter-0.5.0-py3-none-win_amd64.whl
Size 20.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
f0d60576a838ecaac2f621fdecd4f9e4633e7fd0e16ad4e16d5efe6767ea5a89
BLAKE2b-256 checksum
How to use checksums
c4f4906b13fd8bc02dc3e6840d51a89f59b374c72761a58e8af07466337bb683
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.0-py3-none-manylinux_2_28_x86_64.whl

Download URL ggsql_jupyter-0.5.0-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
67192cf53d5a75f4f06e38b5faf0c224973b31116e6a3c664349525612d36355
BLAKE2b-256 checksum
How to use checksums
3f867ace6f2083483740fa52bec4f4d4be6118bf93665ce931181502b2a962da
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.0-py3-none-manylinux_2_28_aarch64.whl

Download URL ggsql_jupyter-0.5.0-py3-none-manylinux_2_28_aarch64.whl
Size 23.0 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
1f35836e6866ebdec7173505c1c36312f5e3467acc0052ce85b77cbaee2d5f6e
BLAKE2b-256 checksum
How to use checksums
8a8b79f0fed2cb5d27f47ed6ce91f9a6a7cfe8760d769393d56469ef4ba3f691
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.0-py3-none-macosx_11_0_arm64.whl

Download URL ggsql_jupyter-0.5.0-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
c91d877e2e11727014fff2baa4c6ff7bf68bbec9e8ae1946a4ca22fdeda4863f
BLAKE2b-256 checksum
How to use checksums
cb6ea7267bba1823aa5116ddd1242536f0898fd612a2a44a95d87c0f14a7691e
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.0-py3-none-macosx_10_12_x86_64.whl

Download URL ggsql_jupyter-0.5.0-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
a79af95449a3c3a1429fe0066eb7a797f3a0f62046fae4de2f2e29a785f1b114
BLAKE2b-256 checksum
How to use checksums
3251bfbcc6c2a671de23f02a1f3d2a709d6959948cebb640f0fa57119d4299e6
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

0.5.2

6 release files

0.5.1

6 release files

This release

0.5.0 This release

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