datapress-core
Backend-agnostic core for datapress — a Rust workspace that exposes Parquet / Delta datasets over a JSON HTTP API.
Overview presentation · Documentation
This crate holds the pieces shared by every backend:
- Configuration model (
datasets.tomlparsing, server/auth/docs/swagger/metrics blocks). - The
Backendtrait and request/response models (QueryRequest, predicates, aggregation plans). - Centralized
AppErrorwith HTTP status mapping. - actix-web routing and v1 handlers, plus optional Swagger UI, Prometheus metrics, and OIDC auth (all feature-gated).
It is consumed by the backend crates
datapress-duckdb and
datapress-datafusion; you
typically depend on one of those rather than on this crate directly.
Features
| Feature | Effect |
|---|---|
duckdb |
Enables the DuckDB From error conversions. |
datafusion |
Enables the Arrow/Parquet/DataFusion From error conversions. |
docs |
Embed and serve the MkDocs site. |
swagger |
Embed Swagger UI + OpenAPI spec. |
metrics |
Expose a Prometheus /metrics endpoint. |
auth |
OIDC bearer-token authentication + scope enforcement. |
explorer |
Embed and serve the browser explorer UI at /explore. |
Note: The explorer's API Query tab decodes Arrow IPC responses in the browser using a vendored Apache Arrow JS bundle. We currently build this bundle from source (
apache/arrow-js, pinned commit) rather than using a publishedapache-arrownpm release, because DataFusion emitsUtf8Viewfor Parquet string columns andUtf8View/BinaryViewread support (apache/arrow-js#320) is merged onmainbut not yet in any published release. See thedocs:vendor-arrowtask. Bump the pinned commit to a release once one ships including #320.
License
MIT — see LICENSE.