Skip to main content

image image image image build image CodeQL image ty

GraphQL service for ibis tables. Ibis supports 20+ backends — DuckDB, PostgreSQL, Polars, BigQuery, etc. — so the same query API works across local files and remote databases. The schema is derived automatically.

Parquet files load with ibis.read_parquet. For hive-partitioned data, DuckLake (graphique.ducklake.register / attach) keeps partition metadata in a catalog so DuckDB can prune and count without scanning footers. Passing a PyArrow Dataset as a root is deprecated.

Usage

There is an example app which reads a parquet dataset.

env PARQUET_PATH=... uvicorn graphique.service:app

Open http://localhost:8000/ to try out the API in GraphiQL. There is a test fixture at ./tests/fixtures/zipcodes.parquet.

env PARQUET_PATH=... strawberry export-schema graphique.service:app.schema

outputs the graphql schema.

Configuration

The example app uses Starlette's config: in environment variables or a .env file.

  • PARQUET_PATH: path to the parquet directory or file
  • NAME = '': GraphQL field on Query; defaults to root type
  • COLUMNS = None: list of names, or mapping of aliases, of columns to select

Configuration options exist to provide a convenient no-code solution, but are subject to change in the future. Using a custom app is recommended for production usage.

App

For more options create a custom ASGI app. Call graphique's GraphQL on an ibis Table. Use a Query type with table attributes for multiple roots, and to enable federation.

import ibis
from graphique import GraphQL, typed

# any ibis backend: DuckDB, PostgreSQL, Polars, BigQuery, ...
table = ibis.read_parquet(...)  # or `ibis.connect(...).table(...)`
app = GraphQL(table)  # Table is root query type


# multiple named fields, with optional federation keys
class Query:
    name = table  # or `typed(table, name, keys=...)`


app = GraphQL(Query)

Start like any ASGI app.

uvicorn <module>:app

API

types

  • Dataset: GraphQL interface over an ibis table.
  • Table: implements the Dataset interface. Adds typed row, columns, and filter fields from introspecting the schema.
  • Column: interface for an ibis column. Each data type has a corresponding column implementation: Boolean, Int, BigInt, Float, Decimal, Date, Datetime, Time, Duration, Base64, String, Array, Struct. All columns have a values field for their list of scalars. Additional fields vary by type.
  • Row: scalar fields. Tables are column-oriented, and graphique encourages that usage for performance. A single row field is provided for convenience, but a field for a list of rows is not. Requesting parallel columns is far more efficient.

selection

  • slice: contiguous selection of rows
  • filter: select rows by predicates
  • join, asofJoin, crossJoin: join tables by key columns
  • difference, intersect, union: set operations on tables
  • take: rows by index
  • dropNull: remove rows with nulls

projection

  • project: project columns with expressions
  • columns: provides a field for every Column in the schema
  • column: access a column of any type by name
  • row: provides a field for each scalar of a single row
  • cast: cast column types
  • unpack: project struct fields
  • fillNull: fill null values

aggregation

  • group: group by given columns, and aggregate the others
  • distinct: group with all columns
  • runs: group by adjacency
  • unnest: unnest an array column
  • count, any: number of rows

ordering

  • order: sort table by given columns
  • first: sort and filter by rank

reflection

  • schema: field names and types
  • optional: nullable for errors
  • toSql: compiles SQL query

Performance

Performance is dependent on the Ibis backend, which defaults to DuckDB. There are no internal Python loops. Scalars do not become Python types until serialized. Table fields are lazily evaluated up until scalars are reached, and automatically cached as needed for multiple fields.

For partitioned parquet datasets, DuckLake provides performance benefits over ibis.read_parquet; see graphique.ducklake.{register,attach} for helpers. python -m graphique.partition in graphique[cli] writes hive-layout parquet out-of-core.

Installation

pip install graphique[server,cli]

Dependencies

  • ibis-framework (with duckdb or other backend)
  • strawberry-graphql[asgi,cli]
  • pyarrow
  • isodate
  • uvicorn (or other ASGI server)

Tests

100% branch coverage.

pytest [--cov]

Metadata

Release files for graphique 2.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 graphique 2.2
File Size Uploaded Provenance Actions
graphique-2.2.tar.gz 33.5 kB With provenance Details for graphique-2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for graphique 2.2
File Interpreter ABI Platform Actions
graphique-2.2-py3-none-any.whl Python 3 none any Details for graphique-2.2-py3-none-any.whl

Total release size: 59.2 kB

Release files / graphique-2.2.tar.gz

Download URL graphique-2.2.tar.gz
Size 33.5 kB
Tags Source
SHA-256 checksum
How to use checksums
20ab34129289213dd76ab6d59c3d3bacf49f1650c5afc14881c90550c65b16c0
BLAKE2b-256 checksum
How to use checksums
261a00ab4e30602b4f076da84b6c1fc5cefb152cdd5998f4ac869c4a24b571aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 12, 2026.

Transparency log

Release files / graphique-2.2-py3-none-any.whl

Download URL graphique-2.2-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b62d9ab9894eeb42ab70385c6224cfa7c85f860950fa61121286ece0113a0bd6
BLAKE2b-256 checksum
How to use checksums
d38944fffd12c118780e1d5ae427a4adf922eee6407c54724be3edbdad0faaf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 12, 2026.

Transparency log

Security for graphique 2.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for graphique-2.2.tar.gz

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 Nov 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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