Skip to main content

shillelagh-gristapi

A Shillelagh adapter that exposes the Grist REST API as SQL-queryable virtual tables via SQLite/SQLAlchemy.

Features

  • Query Grist documents, tables, and records with SQL
  • Filter pushdown for = and IN conditions; server-side ORDER BY and LIMIT
  • Discovery queries: list organizations, workspaces, documents, and tables via grist:// URIs
  • Column metadata introspection via grist://<doc_id>/<table_id>/__columns__
  • Built-in TTL caching (SQLite or in-memory) to reduce API calls
  • Enforces Grist access rules — your API key permissions apply automatically
  • Works with Apache Superset, the shillelagh CLI, and any SQLAlchemy-compatible tool

Installation

pip install shillelagh-gristapi

For the interactive CLI:

pip install 'shillelagh[console]'

For source installation, see docs/getting-started.md.

Quickstart

from shillelagh.backends.apsw.db import connect
import os

conn = connect(
    ":memory:",
    adapter_kwargs={"gristapi": {"grist_cfg": {
        "server": os.environ["GRIST_SERVER"],
        "org_id": int(os.environ["GRIST_ORG_ID"]),
        "api_key": os.environ["GRIST_API_KEY"],
    }}},
)
cursor = conn.cursor()
rows = cursor.execute('SELECT * FROM "grist://<DOC_ID>/<TABLE_ID>" LIMIT 10').fetchall()

Documentation

Document Description
docs/getting-started.md Prerequisites, install, step-by-step first queries
docs/uri-reference.md All grist:// URI patterns and their column schemas
docs/configuration.md CLI, Python, and Superset configuration reference
docs/type-mapping.md Grist column types to SQL/Shillelagh field mapping
docs/superset.md Apache Superset integration guide
docs/limitations.md Known restrictions and performance notes

License

MIT — see LICENSE.

Release files for shillelagh-gristapi 0.2.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 shillelagh-gristapi 0.2.1
File Size Uploaded
shillelagh_gristapi-0.2.1.tar.gz 25.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shillelagh-gristapi 0.2.1
File Interpreter ABI Platform
shillelagh_gristapi-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 44.6 kB

Release files / shillelagh_gristapi-0.2.1.tar.gz

Download URL shillelagh_gristapi-0.2.1.tar.gz
Size 25.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e813511009ab177ced9705bc42dbabe00b38d1eca95b68ef99e5ee7418cdc5ad
BLAKE2b-256 checksum
How to use checksums
ce1d3ad3df85995427e4c2751b1596396594dadece2211165719f63d2196624d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 8, 2026.

Transparency log

Release files / shillelagh_gristapi-0.2.1-py3-none-any.whl

Download URL shillelagh_gristapi-0.2.1-py3-none-any.whl
Size 19.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
91b2771e26fd71894017305424155e0bf3051071fdd3861b42bc7fdbe0e2a8f1
BLAKE2b-256 checksum
How to use checksums
d0b7b568977d2955b71f4d5927f370fc1f753f1399f4db2ac04dde4cfe4bacbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

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