Skip to main content

Python bindings for Wren Engine semantic layer (wren-core)

Project description

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

Project details


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.5.0rc1.tar.gz (173.7 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.5.0rc1-cp311-abi3-win_amd64.whl (41.7 MB view details)

Uploaded CPython 3.11+Windows x86-64

wren_core_py-0.5.0rc1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (47.8 MB view details)

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

wren_core_py-0.5.0rc1-cp311-abi3-macosx_11_0_arm64.whl (42.5 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

wren_core_py-0.5.0rc1-cp311-abi3-macosx_10_12_x86_64.whl (44.5 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file wren_core_py-0.5.0rc1.tar.gz.

File metadata

  • Download URL: wren_core_py-0.5.0rc1.tar.gz
  • Upload date:
  • Size: 173.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for wren_core_py-0.5.0rc1.tar.gz
Algorithm Hash digest
SHA256 4b5496d610386388331d88520903ae4fb9f189883aedd88edd025fd6a501ed21
MD5 89af66702f5b5f9fd19229fdf5f4bc76
BLAKE2b-256 9eb11598bf8949898cfe8f6a3b7c9dd63102dca32332c62feba08bacf1c5e021

See more details on using hashes here.

File details

Details for the file wren_core_py-0.5.0rc1-cp311-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for wren_core_py-0.5.0rc1-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 8f79955e6e64ca87e58dc08848bafd9edf324cb91e35232ba45ab5811bae0d9e
MD5 6bce8a1ed6f3566aef8033ed507c8904
BLAKE2b-256 c347291939988bb6294b7c84970f0dacb01162122c091daee5bf79c4b5be2c0f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wren_core_py-0.5.0rc1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e2f8420e3b952f983f76df776a2774ffd7abc66be0b6a74f320da4a8d5d1c7dd
MD5 885e9f358af7516bf7f860af4b7525ac
BLAKE2b-256 e066850e43501e88a5d010bba762e001a7eedc3309d210f62d9e02628ed05a1b

See more details on using hashes here.

File details

Details for the file wren_core_py-0.5.0rc1-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wren_core_py-0.5.0rc1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 98654aeeb160e8d5aabfd0ad6713a1c4191cada9151c59248e75d6229f6224bf
MD5 0fc1b8e66c41e6e89351df86627d4be3
BLAKE2b-256 36129be57ddcec360bece19004186cbb97458f2afde9f869ba5ad756cdb543b3

See more details on using hashes here.

File details

Details for the file wren_core_py-0.5.0rc1-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for wren_core_py-0.5.0rc1-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4cc8b63f8faddf390f55d5e12f2e995d94adc3f6b52a620b3e439eafcf1d7ba3
MD5 d88f3e5f5ea6f0d6bc6958ca0aa503a9
BLAKE2b-256 3de0cd0a5f2370efc212ffca884b9439a0e21b6062e21dfd4fc2fee8b0747cf5

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 Pingdom Monitoring Sentry Error logging StatusPage Status page