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.3.tar.gz (216.4 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.3-cp311-abi3-win_amd64.whl (41.4 MB view details)

Uploaded CPython 3.11+Windows x86-64

wren_core_py-0.7.3-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.3-cp311-abi3-macosx_11_0_arm64.whl (41.6 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

wren_core_py-0.7.3-cp311-abi3-macosx_10_12_x86_64.whl (43.4 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: wren_core_py-0.7.3.tar.gz
  • Upload date:
  • Size: 216.4 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.3.tar.gz
Algorithm Hash digest
SHA256 4ca0484010cd29170af830132ce7d60d42a97be0f8c7830290b79af279cf9697
MD5 82181c3ea5b21ade4e0804269d4c3ccc
BLAKE2b-256 085d58c7abf661e644997a8c9879c54e1ec5568cad0a6bbe739d2392452c4e54

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wren_core_py-0.7.3-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.3-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 da193cadedf1b1ef8e3b45f1deba5a2f3b83f6283cf37f96e4b5f2314b5fe38a
MD5 ace249d994375306e6450875c4a36374
BLAKE2b-256 643faf852318ad4a6abee37bcce71ac06928cb669bf1e9655a615225ef9b7818

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wren_core_py-0.7.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ad0aca6112302f03fac2db52256d8fc0b9b14056c25dd632a8cbddd734449e89
MD5 0dd934698932a9dd7233ccf9d8104b38
BLAKE2b-256 ee020fd9d84f6bc286d6871663e20e97d7c95e29a0ba0ba597241eabf7d00241

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wren_core_py-0.7.3-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4091496114b02ab0e5987e96e719f967f19da37a9b901d7dd4140ca2ad7b8e97
MD5 6b3d7e367fae601c8121af38070dff1b
BLAKE2b-256 eb71e2e8535843d227d71b630a9ced49d5fc8706c2888a8628c8a89dba22ca94

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wren_core_py-0.7.3-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9cd934c60828dcc090251bd0d0ba48b147cdb3b9463c6a872f128b46f10cdbfc
MD5 fa78c550b63251489efbfd764b89f17b
BLAKE2b-256 5a7f653638f6ecec340877e4c715a78aca9cd8958a536365ad7eefbdb2c1e6d6

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