Skip to main content

image image image image build image CodeQL image ty

GraphQL service for ibis dataframes, arrow tables, and parquet datasets. The schema for a query API is derived automatically.

Version 2

When this project started, there was no out-of-core execution engine with performance comparable to PyArrow. So it effectively included one, based on datasets and Acero.

Since then the ecosystem has grown considerably: DuckDB, DataFusion, and Ibis. As of version 2, graphique is based on ibis. It provides a common dataframe API for multiple backends, enabling graphique to also have a default but configurable backend.

Being a major version upgrade, there are incompatible changes from version 1. However the overall API remains largely the same.

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 or arrow Dataset. Use a Query type with dataset attributes for multiple roots, and to enable federation.

import ibis
from graphique import GraphQL, typed

source = ibis.read_*(...)  # or `ibis.connect(...).table(...)` or `pyarrow.dataset.dataset(...)`
# apply initial projections or filters to `source`
app = GraphQL(source)  # Table is root query type

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

Start like any ASGI app.

uvicorn <module>:app

API

types

  • Dataset: interface for an ibis table or arrow dataset.
  • 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: provisionally group by adjacency
  • unnest: unnest an array column
  • count, any: number of rows

ordering

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

reflection

  • type: type of data source
  • 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.

PyArrow is also used for partitioned dataset optimizations. python -m graphique.partition is a command-line script provided in graphique[cli], for out-of-core partitioning.

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.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 graphique 2.1
File Size Uploaded
graphique-2.1.tar.gz 34.2 kB Details

Built distribution (wheel)

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

Total release size: 60.3 kB

Release files / graphique-2.1.tar.gz

Download URL graphique-2.1.tar.gz
Size 34.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a2b97f94a5da15187fd29e0b04d272e0c5014656ed07c7968f6f2fe780ebfd5d
BLAKE2b-256 checksum
How to use checksums
0aea80b9248d09e1de33833b7792a556e894110000598c3a0e09fce0499be5ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 22, 2026.

Transparency log

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

Download URL graphique-2.1-py3-none-any.whl
Size 26.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f844ce0e0f954488d4504d5c8548402297e4124dfe84240fcac795099bc4587
BLAKE2b-256 checksum
How to use checksums
ce5111c9288fe3374ec56637e978ce4d45afbea054efc63a5eaa9b1b1d602ff8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 22, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.1 This release

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0

2 release files

1.9

2 release files

1.8

2 release files

1.7

2 release files

1.6

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

0.9

2 release files

0.8

2 release files

0.7

2 release files

0.6

13 release files

0.5

6 release files

0.4

10 release files

0.3

7 release files

0.2

5 release files

0.1

4 release files

0.0

1 release file

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