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.1

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.1
File Size Uploaded
ggsql_jupyter-0.5.1.tar.gz 1.5 MB Details

Built distributions (wheels)

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

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

Download URL ggsql_jupyter-0.5.1-py3-none-win_amd64.whl
Size 20.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
59ccc52ccc670ddb3aace1573fdf3b407d9dd53b4a199d08b55e73095c9445d3
BLAKE2b-256 checksum
How to use checksums
e051609efe9fb99e3e7fb64b9b57967127da6e7fbf718f47e5728c51fb6f2556
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.1-py3-none-manylinux_2_28_x86_64.whl

Download URL ggsql_jupyter-0.5.1-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
7e49759f65ac84f115f379a840ce6f8d097edda6ef3b4ce04d862633267704ef
BLAKE2b-256 checksum
How to use checksums
f1b2d460a303d42dd0a2d477120d68e7d0aeab27119186d9099dd18e959b01dd
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.1-py3-none-manylinux_2_28_aarch64.whl

Download URL ggsql_jupyter-0.5.1-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
e8617d6566e2888e006cf1ac630914816236d050cb07e8583e6f3b290725a719
BLAKE2b-256 checksum
How to use checksums
38535f8c2d8d2b989fa40ca4674e1cf4056dee6adb8ad55787d71f45aad03194
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.1-py3-none-macosx_11_0_arm64.whl

Download URL ggsql_jupyter-0.5.1-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
54a8b4bf3303005c03297686965c77d208a69c36350a04fe240888dbde8ff16d
BLAKE2b-256 checksum
How to use checksums
1eafd3f16b1a7c5a6c17975ff233d6a43036ac5b7b159a5216c3849422a98db1
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.1-py3-none-macosx_10_12_x86_64.whl

Download URL ggsql_jupyter-0.5.1-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
1a8d8f07adaecf480f3507305df49190118b94c557aba2acdd9074247b9cad44
BLAKE2b-256 checksum
How to use checksums
a952fb69a109c6f50d6e9cadc955d729f4578086b8bd5a99d79b1ec49818f9f6
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

This release

0.5.1 This release

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