substrait
A python package for Substrait.
Decision gist · record as of 2026-08-14
Yes, if you need to generate or consume Substrait plans in Python. Low install friction, active maintenance, no known vulnerabilities, and permissive licensing make it safe to adopt. The DataFrame API is approachable for typical use cases. Not suitable if you need plan execution—use it only as a builder for engines that consume Substrait.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later (and less than 3.15).
- For function overload resolution, install the extensions extra: pip install "substrait[extensions]".
- Low install friction; pure Python wheel with three runtime dependencies (protobuf, substrait-protobuf, substrait-extensions).
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
last release 2026-07-29 (16 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 326,474 downloads/mo, #7,575 on PyPI
Alternatives
Verify before relying
pip install substrait
import substrait.dataframe as sub
plan = (
sub.read_named_table("people", {"id": sub.i64, "age": sub.i64})
.filter(sub.col("age") > 25)
.to_plan()
)
serialized = plan.SerializeToString()- Whether the DataFrame API fully covers all Substrait specification features or if some plans require the lower-level proto/builders API.
- Performance characteristics when building or serializing large or deeply nested plans.
- Compatibility guarantees with specific versions of DuckDB, DataFusion, or other Substrait consumers.
What it is and what it does
Substrait is a Python binding for the Substrait specification, a cross-language standard for representing data compute operations. It lets you build query plans programmatically in Python and serialize them for execution by Substrait-compatible engines like DuckDB or DataFusion. The package offers two main APIs: a high-level DataFrame interface (similar to Polars or PySpark) for ergonomic plan authoring, and lower-level proto and builder layers for fine-grained control. Plans can be constructed from scratch, parsed from binary or JSON representations, or consumed from other Substrait producers like Ibis.
The package is experimental and actively developed. It depends on protobuf for serialization and substrait-protobuf for the core message definitions. It is not an execution engine itself—it is purely a plan builder and consumer. The DataFrame API is the recommended approach for hand-authored plans, while the proto layer provides direct access to the underlying Substrait message types for advanced use cases.
Use it for
- Build query plans in Python and pass them to DuckDB or DataFusion for execution.
- Parse and inspect Substrait plans received from other producers like Ibis.
- Serialize plans to binary or JSON for transmission or storage across language boundaries.
- Construct complex data operations programmatically using the fluent DataFrame API.
- Integrate Substrait plan generation into Python data pipelines or query optimization tools.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to generate or consume Substrait plans in Python.
Low install friction, active maintenance, no known vulnerabilities, and permissive licensing make it safe to adopt. The DataFrame API is approachable for typical use cases. Not suitable if you need plan execution—use it only as a builder for engines that consume Substrait.
Install
substrait on PyPI
Before you install
Low install friction; pure Python wheel with three runtime dependencies (protobuf, substrait-protobuf, substrait-extensions). Package is actively maintained with a release 16 days old.
Requires Python 3.10 or later (and less than 3.15). For function overload resolution, install the extensions extra: pip install "substrait[extensions]".
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install substrait
import substrait.dataframe as sub
plan = (
sub.read_named_table("people", {"id": sub.i64, "age": sub.i64})
.filter(sub.col("age") > 25)
.to_plan()
)
serialized = plan.SerializeToString()
Verify before relying
- Whether the DataFrame API fully covers all Substrait specification features or if some plans require the lower-level proto/builders API.
- Performance characteristics when building or serializing large or deeply nested plans.
- Compatibility guarantees with specific versions of DuckDB, DataFusion, or other Substrait consumers.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release <3.15,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesprotobufsubstrait-protobufsubstrait-extensions |
| Maintenance | Actively maintained 16 days since the last release |
| First released | |
| Downloads | 326,474 / month, #7,575 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: substrait-0.30.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “substrait plan builder python”
- substraitProvides a Python interface to construct, manipulate, and serialize…
- substrait-protobufProvides Python protobuf bindings for the Substrait specification,…
- praisonaiagentsPraisonAI agents is a Python framework for building and running…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also substrait-protobuf · ibis-framework · dlt · datafusion · duckdb-extension-httpfs · dask-expr · fugue · sqlglotrs · construct · sqlglot