Releases: Firlej/ibis-dune
Releases · Firlej/ibis-dune
Release list
v0.2.0
0.2.0 — 2026-09-21
Breaking changes
- Trino only: ibis-dune no longer falls back to Dune REST
/sql/execute. A paid API plan with Trino access is required. Free-tier keys raiseDuneQueryErrorwith a paid-plan hint. - Removed connect options:
force_api,dune_sql_performance,dune_api_warning_bytes,dune_api_max_bytes. - Removed API:
uses_api,reset_to_trino(),DuneResultTooLargeError,ApiExecutionMixin. UseExecutionMixinfor Trinoexecute/_cursor_batcheserror translation. - Removed dependency:
dune-clientis no longer a runtime dependency.
Improved
- errors: Invalid performance tier failures include an explicit paid-plan / Trino-access hint instead of switching transports.
- schema:
get_schemaand schema-lesssql()use Trino information_schema and LIMIT 0 only.
Features
- None beyond the Trino-only execution model.
0.1.1
0.1.1 — 2026-07-07
Fixed
- Free-tier API keys — schema-less
sql()andget_schema()LIMIT 0 probes now flip to REST on Trino "Invalid performance tier" errors, matchingexecute()behavior. Free-tier keys work withoutforce_api=True. - sqlglot Dune dialect — pin
sqlglot>=26.4.0,!=26.32.0sofrom sqlglot.dialects.dune import Duneresolves on fresh installs (e.g. Google Colab).
Improved
- Auth errors — Trino and REST authentication failures wrap as
DuneQueryErrorwith a hint to checkdune_api_key.
0.1.0
YANKED: This release was yanked on PyPI and is superseded by v0.1.1.
0.1.0 — 2026-07-06
First public release of ibis-dune: an Ibis backend for querying Dune Analytics with Python table expressions.
Features
Ibis integration
- Register as a standard Ibis backend (
duneentry point):ibis.dune.connect(dune_api_key=...)orBackend().connect(...) - Build and execute Ibis table expressions against Dune datasets —
table(), filters, projections, joins, aggregates, andsql()compile to Dune SQL via the sqlglotDunedialect sql(query)infers column types automatically whenschemais omitted
Execution (Trino + REST)
- Primary execution path: Trino at
trino.api.dune.com - Automatic fallback to Dune REST
/sql/executewhen Trino rejects the API performance tier; session stays on REST untilreset_to_trino()is called force_api=Trueto start on REST;uses_apireports the active transport- Configurable REST SQL performance tier (
dune_sql_performance) and result size limits (dune_api_warning_bytes,dune_api_max_bytes) - REST path honors
limitandparamsthe same way as Trino; paginates large REST results and retries on rate limits
Trino / REST result parity
execute(),to_pyarrow(), and rich table previews return equivalent dtypes, values, and row order on Trino and REST paths- REST JSON rows are coerced to match Trino output: decimals normalized, varbinary as
0x-prefixed hex strings, Dune REST column names normalized to ibis schema keys
Schema discovery
get_schema(table, database=...)viainformation_schemawith LIMIT 0 fallback when metadata is empty- Hybrid type inference: prefers Dune REST
column_typeswhen Trino cursor metadata is lossy (e.g.varbinaryreported asvarchar) - Missing table, schema, or catalog →
TableNotFound; other backend failures →DuneQueryError
Dune-specific types and SQL helpers
uint256columns map toDecimal(78, 0)in the Ibis type system (DuneType/DuneCompiler)hex_literal(hex)— validated hex literal compiled to DuneHEXsyntaxraw_predicate(sql)— embed verbatim Trino SQL in filtersraw_scalar(sql, dtype)— embed verbatim Trino SQL in projections with an explicit Ibis dtype
Display and large integers
install_uint256_support()andinstall_rich_formatting()applied automatically on connect (also callable directly)- Large decimals (including uint256) use PyArrow string surrogates where needed; rich previews label uint256 and render binary columns as hex
Errors and robustness
DuneQueryError— compact wrapper for Trino and REST query failures (including RESTQueryFailedError)DuneResultTooLargeError— raised when a REST result exceedsdune_api_max_bytes- Trino cursor cleanup preserves the original query error when close raises HTTP 405
Packaging
- Typed package (
py.typed); supports Python 3.11, 3.12, and 3.13 - Depends on
ibis-framework[trino]12.x anddune-client>= 1.10.0
Requirements
- Python 3.11+
ibis-framework[trino]>=12, <13dune-client>=1.10.0