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.7.0.tar.gz (197.1 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.0-cp311-abi3-win_amd64.whl (42.3 MB view details)

Uploaded CPython 3.11+Windows x86-64

wren_core_py-0.7.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (48.4 MB view details)

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

wren_core_py-0.7.0-cp311-abi3-macosx_11_0_arm64.whl (43.1 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

wren_core_py-0.7.0-cp311-abi3-macosx_10_12_x86_64.whl (45.2 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: wren_core_py-0.7.0.tar.gz
  • Upload date:
  • Size: 197.1 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.7.0.tar.gz
Algorithm Hash digest
SHA256 0495a523f22b25e5358ec3ea43da8e3c4f2690d0a82d68bddeb92f43554c1e46
MD5 b9cb48d7cc071a490c90dd519ab36e87
BLAKE2b-256 aa6d7d51713ad720c60edd0594c7e2c090593ee96d2b6a06edaab33928d6fabb

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for wren_core_py-0.7.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 eece8ca7ff71a4fbe8908257c9236db5746c432c7096bbb2d5e2347fd0b3a43a
MD5 dfb5a2633d3997f483c210aa119936c0
BLAKE2b-256 0d8e81cd879161fb7c00b99f090a90298fdad716fc1d293855307b1aef437446

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wren_core_py-0.7.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6b6b8ce25cfd7a25b7c2b43b191e503f75e6b25e1a13feee73657b7a73252ccb
MD5 c3b51c68d6593d6bdc8d319abb01b4fe
BLAKE2b-256 25bdfed8cf404e1a1d627c658ee0306c7830c33df71dc6395254b32d9821d258

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wren_core_py-0.7.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dd899bbfd44147955740276234195c023f4c586ead7292a50d720d4c5c66f328
MD5 f6af368b22f47b20e548c7c9eece8543
BLAKE2b-256 c29bc614d9355b9b76c2445912ef34fafd5788e51cebb53db0637cd153deec40

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wren_core_py-0.7.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 acd38a592f8e8ff9191dc11ebe09be99a104e3346bfc4966f8d0d9696be22d77
MD5 16cb2ed96fbcf5637eff151505927801
BLAKE2b-256 4ca6a0286021c564829f92de1cbff3e1656c6619418462fb92157af0362344a6

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