Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Python Bindings to Yggdrasil

Provides high level bindings to the Unleash Yggdrasil engine.

Implements the engine methods the Python SDK uses.

  • src/: the Rust part, compiled into the Python module yggdrasil_engine.yggdrasil_native
    • lib.rs: the Python glue around the core engine
  • python/yggdrasil_engine/: the Python package
  • tests/: python tests
  • scripts/smoke_test.py: checks an installed wheel; the publish workflow runs it on every platform

Test locally

Rust and Python 3.10 or newer is needed. Run everything from this folder (python-engine/).

The Python tests include the client specification, which they read from the repository root:

git clone --depth 1 --branch v6.1.0 https://github.com/Unleash/client-specification.git ../client-specification

Rust

cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings

Python

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install --group dev

Then build the engine, with one of the two commands below.

Both turn on the test-helpers cargo feature. It adds test-only functions to the module, which tests/test_context_reader.py needs. The published wheel is built without it.

While developing: maturin develop

maturin develop --features test-helpers
  • compiles the Rust code and puts the module into python/yggdrasil_engine/; the virtual environment uses this folder directly, so Python changes apply without rebuilding
  • after changing Rust code, run it again
  • debug build by default (faster to compile, slower to run); add --release for an optimised build

Like CI: install the package

MATURIN_PEP517_ARGS="--features test-helpers" python -m pip install .
  • builds the package the way the wheel is built (release mode) and installs it into the virtual environment, so the tests run against the installed package
  • after changing any code, Rust or Python, run it again

Then run the checks:

pytest
ruff format --check .
ruff check .

Context reader tests

tests/test_context_reader.py reads each context both with our reader and with unleash-types' parsing of json.dumps(context), and expects the same result. Needs the test-helpers` feature.

To run one case, give its full test ID (the case name goes in the brackets):

pytest -v "tests/test_context_reader.py::test_context_reader_matches_unleash_types[leftover string overrides properties]"

To run several cases, -k matches words in the case names, e.g. every case with "leftover":

pytest tests/test_context_reader.py -v -k leftover

When a case fails, -vv prints the full diff of the two contexts, and --showlocals (-l) also prints the test's local variables:

pytest tests/test_context_reader.py -vv -l -k leftover

Publish

  1. Bump version in pyproject.toml
  2. Run the manual Publish Python workflow (.github/workflows/publish-python.yml)

It builds one wheel per platform (Linux glibc and musl, macOS, Windows; x86_64 and arm64) and an sdist, installs each on a machine of its platform, runs scripts/smoke_test.py, and uploads to PyPI only if every test passed. With dry_run (the default) it builds and tests without uploading.

Metadata

Release files for yggdrasil-engine 3.0.0a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yggdrasil-engine 3.0.0a2
File Size Uploaded Provenance Actions
yggdrasil_engine-3.0.0a2.tar.gz 27.8 kB Without provenance Details for yggdrasil_engine-3.0.0a2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for yggdrasil-engine 3.0.0a2
File Actions
yggdrasil_engine-3.0.0a2-cp310-abi3-win_arm64.whl CPython 3.10 abi3 Windows ARM64 Details for yggdrasil_engine-3.0.0a2-cp310-abi3-win_arm64.whl
yggdrasil_engine-3.0.0a2-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for yggdrasil_engine-3.0.0a2-cp310-abi3-win_amd64.whl
yggdrasil_engine-3.0.0a2-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details for yggdrasil_engine-3.0.0a2-cp310-abi3-musllinux_1_2_x86_64.whl
yggdrasil_engine-3.0.0a2-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details for yggdrasil_engine-3.0.0a2-cp310-abi3-musllinux_1_2_aarch64.whl
yggdrasil_engine-3.0.0a2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for yggdrasil_engine-3.0.0a2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
yggdrasil_engine-3.0.0a2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for yggdrasil_engine-3.0.0a2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
yggdrasil_engine-3.0.0a2-cp310-abi3-macosx_11_0_x86_64.whl CPython 3.10 abi3 macOS 11.0+ x86-64 Details for yggdrasil_engine-3.0.0a2-cp310-abi3-macosx_11_0_x86_64.whl
yggdrasil_engine-3.0.0a2-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for yggdrasil_engine-3.0.0a2-cp310-abi3-macosx_11_0_arm64.whl

Total release size: 10.4 MB

Release files / yggdrasil_engine-3.0.0a2.tar.gz

Download URL yggdrasil_engine-3.0.0a2.tar.gz
Size 27.8 kB
Tags Source
SHA-256 checksum
How to use checksums
91f3ade5ba165255eb6ef0ffe0d8e91ce588e46f60f8d59514be6b611a643173
BLAKE2b-256 checksum
How to use checksums
1986055e6115bd93e5a8bfe260f9083a19848b03362bb08965604b2a6ba5b941
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Release files / yggdrasil_engine-3.0.0a2-cp310-abi3-win_arm64.whl

Download URL yggdrasil_engine-3.0.0a2-cp310-abi3-win_arm64.whl
Size 1.1 MB
Tags CPython 3.10 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
2480db68e9bd8051d919e843f5ea088c3c6a9418fc2dfbb50d3e1e04a7989889
BLAKE2b-256 checksum
How to use checksums
ca410d96be4abb0001acd4c2b5e684be4e7cb61213d4d5f13b0d957407b94018
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Release files / yggdrasil_engine-3.0.0a2-cp310-abi3-win_amd64.whl

Download URL yggdrasil_engine-3.0.0a2-cp310-abi3-win_amd64.whl
Size 1.2 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
0b4d734e449774f942ac29e88782e4d08062112b3aec6cc15ed73ceec2b1176a
BLAKE2b-256 checksum
How to use checksums
7ccd6472e4871b9d3cce72c35c6cc4356683b883f3f937d449d88d7f3e6f1c5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Release files / yggdrasil_engine-3.0.0a2-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL yggdrasil_engine-3.0.0a2-cp310-abi3-musllinux_1_2_x86_64.whl
Size 1.5 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
6dd58b1ea0b38cc4ac17049e61bd62b7e59830d3b27d25430511fe320d8d14ee
BLAKE2b-256 checksum
How to use checksums
8f8a1ebc6926855fcf5675ebf23281b99ca6520fd15fb53811916c595d563cbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Release files / yggdrasil_engine-3.0.0a2-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL yggdrasil_engine-3.0.0a2-cp310-abi3-musllinux_1_2_aarch64.whl
Size 1.5 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
7cda1cb55fe5a789da2c2d4227931b3bad123de97d48a40b8c5d97df6fb286de
BLAKE2b-256 checksum
How to use checksums
5c1b184a89ca22426efabc30aa0b6bed0f48e16682862221f60f1cdcc8910870
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Release files / yggdrasil_engine-3.0.0a2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL yggdrasil_engine-3.0.0a2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.3 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
2e7f312084fa4f67b672c6cea1404bf769376fb6e467f4b096b4589f91a19c79
BLAKE2b-256 checksum
How to use checksums
9cbdd37eef0a94f047a79b0ba95ae2cb5eeed825aa5dbc9849aa98105eb2b340
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Release files / yggdrasil_engine-3.0.0a2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL yggdrasil_engine-3.0.0a2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.3 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
35b23e588aa6706932994e1efea23cf7dbcd93e4bb0745e532da7536e0e5ba70
BLAKE2b-256 checksum
How to use checksums
f2ff434e5f0d4bb200efd5a74557f4d8e62511ba69d21966ccceae415e9bd07f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Release files / yggdrasil_engine-3.0.0a2-cp310-abi3-macosx_11_0_x86_64.whl

Download URL yggdrasil_engine-3.0.0a2-cp310-abi3-macosx_11_0_x86_64.whl
Size 1.3 MB
Tags CPython 3.10 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
5c767a876ef57b6648bc3b3fdb2760e7e7b5039b452b496ef025b9059d004144
BLAKE2b-256 checksum
How to use checksums
a915f520ba5af7be9142afc4030aedfa0969980418671d0afad842b242813395
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Release files / yggdrasil_engine-3.0.0a2-cp310-abi3-macosx_11_0_arm64.whl

Download URL yggdrasil_engine-3.0.0a2-cp310-abi3-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
79b49e7874568b46343ee43aef106729882cfdbf8e92f78cc4d4664f59207d91
BLAKE2b-256 checksum
How to use checksums
f688baaa082a03730318e4a69baa98459b7bc1c45663c87c6fe9986fd22e9358
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Security for yggdrasil-engine 3.0.0a2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page