Skip to main content

Wren Core Python Binding

Python bindings for wren-core, the Rust semantic engine behind Wren Engine. Built with PyO3 and Maturin.

Wren Engine translates SQL queries through a semantic layer (MDL - Modeling Definition Language) and executes them against 22+ data sources (PostgreSQL, BigQuery, Snowflake, etc.).

Installation

pip install wren-core-py

Requires Python >= 3.11.

Pre-built wheels are available for:

  • Linux x86_64
  • macOS x86_64 / ARM64 (Apple Silicon)
  • Windows x86_64

Linux ARM64 wheels are not yet available. To use on that platform, build from source (requires Rust toolchain).

Quick Start

from wren_core import SessionContext, to_manifest

# Load an MDL manifest from a base64-encoded JSON string
base64_mdl_json = "<your-base64-encoded-mdl-json>"
manifest = to_manifest(base64_mdl_json)

# Create a session context for query planning
ctx = SessionContext(manifest, remote_functions=[])

# Transform a SQL query through the semantic layer
planned_sql = ctx.transform_sql("SELECT * FROM my_model")

Developer Guide

Environment Setup

Test and Build

After installing casey/just, you can use the following commands:

  • just install — Create Python venv and install dependencies.
  • just develop — Build the Rust package for local development (required before running Python tests).
  • just test-rs — Run Rust tests only.
  • just test-py — Run Python tests only.
  • just test — Run both Rust and Python tests.
  • just build — Build the Python wheel. Output goes to target/wheels/.

Coding Style

Format via just format.

Publishing

See scripts/publish.sh for local publishing to PyPI/TestPyPI:

./scripts/publish.sh --build    # Build wheel only
./scripts/publish.sh --test     # Build + publish to TestPyPI
./scripts/publish.sh            # Build + publish to PyPI

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wren_core_py-0.7.2.tar.gz (216.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

wren_core_py-0.7.2-cp311-abi3-win_amd64.whl (41.4 MB view details)

Uploaded CPython 3.11+Windows x86-64

wren_core_py-0.7.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (46.4 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ x86-64

wren_core_py-0.7.2-cp311-abi3-macosx_11_0_arm64.whl (41.5 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

wren_core_py-0.7.2-cp311-abi3-macosx_10_12_x86_64.whl (43.3 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file wren_core_py-0.7.2.tar.gz.

File metadata

  • Download URL: wren_core_py-0.7.2.tar.gz
  • Upload date:
  • Size: 216.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for wren_core_py-0.7.2.tar.gz
Algorithm Hash digest
SHA256 f309a6ecaa261854ee066865ceb108a35b9e198f19cb18308b99442a30a2327a
MD5 6b35113c5ac356e48b676b7a9a38d1c2
BLAKE2b-256 f86a8129709cf65550fd95570f249011c406e41fde98a1594d0d6c638fe591f6

See more details on using hashes here.

File details

Details for the file wren_core_py-0.7.2-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: wren_core_py-0.7.2-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 41.4 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for wren_core_py-0.7.2-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 086c46309acebb31d01afeaa40c668a5f0bf49dae48337d0e8709c33bb3c6cb8
MD5 b4516df6260f58b8c5bd5ea705313ec2
BLAKE2b-256 20f565f3497a2724e0300b6240fdcbbe37a37d9a9748796cf223dea5143c9486

See more details on using hashes here.

File details

Details for the file wren_core_py-0.7.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for wren_core_py-0.7.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5edf79aa10369845dd88963baae7ffcb963eda17f8aa5901560311ecaf143750
MD5 6ca20721ea8cc26889454c819f1798df
BLAKE2b-256 74efb8bb101bba5cb67bae53bac58ff28451580cc99e9b44ce7ee5787feb17cd

See more details on using hashes here.

File details

Details for the file wren_core_py-0.7.2-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wren_core_py-0.7.2-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a0cb8ed4531296b9b7555a0ba14fe4961a3d3be352417add67e785effa0b7571
MD5 d5c2afabb5c6b2c755b83d8ccab586d3
BLAKE2b-256 d0ba86a1dca5b8239ac86322a20d83d89f755ea3bba02adc33e221fc5f426e9c

See more details on using hashes here.

File details

Details for the file wren_core_py-0.7.2-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for wren_core_py-0.7.2-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 14f561158752bd26b2e79a8e093400633b4027940ef68543f1f3ccbe2772263d
MD5 76951309e48a74ae7c9641aecbd19098
BLAKE2b-256 23b7ed14f3e3377a71fcdf9c9db56bb184638b5cd57dc23a53fd50ee79edf71d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page