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.0a1

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.0a1
File Size Uploaded Provenance Actions
yggdrasil_engine-3.0.0a1.tar.gz 25.5 kB Without provenance Details for yggdrasil_engine-3.0.0a1.tar.gz

Built distributions (wheels)

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

Total release size: 10.3 MB

Release files / yggdrasil_engine-3.0.0a1.tar.gz

Download URL yggdrasil_engine-3.0.0a1.tar.gz
Size 25.5 kB
Tags Source
SHA-256 checksum
How to use checksums
be13db830f5ec1175ec8134c453bc524428b27e8f0bc19d8a9e9bef29eab2c30
BLAKE2b-256 checksum
How to use checksums
50db295980ab73182b415b37835c3a9c64d75996be543114db55fc821ab74333
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

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

Download URL yggdrasil_engine-3.0.0a1-cp310-abi3-win_arm64.whl
Size 1.1 MB
Tags CPython 3.10 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
1dc928b8bf79a26e6f6b3755562917afd4ba0e31b8350caea480683f0853887b
BLAKE2b-256 checksum
How to use checksums
7d5d7fde36ad8f37ea701f32572f69924d12600d1dbef645d2f4f3a313c327c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

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

Download URL yggdrasil_engine-3.0.0a1-cp310-abi3-win_amd64.whl
Size 1.2 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
086310110de7949a4b6d6ed1e188ebccc534196d4b6c4e213b56501521d54ddb
BLAKE2b-256 checksum
How to use checksums
6439265ceedc25b7773ed0f674f75f92a7be35aac7fbd47a547b5121a34660b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

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

Download URL yggdrasil_engine-3.0.0a1-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
b5fb5bc5f1ececd26047e6c3355b7cebfe25a261738eaf77877677c8acdc2a9b
BLAKE2b-256 checksum
How to use checksums
9d264a90e7f0905243a1abf0726a1909afa007ea0d4db6d42f60efefb678d15b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

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

Download URL yggdrasil_engine-3.0.0a1-cp310-abi3-musllinux_1_2_aarch64.whl
Size 1.4 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
254b61b4ec6233173d7c7e2691910d33ff8fc82aa5170212342bc7fd28489531
BLAKE2b-256 checksum
How to use checksums
2540b5fcfd94dbb2f711fc126ab7a8c7ec90ca0181d15da68e6d3cfc7e93e7b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

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

Download URL yggdrasil_engine-3.0.0a1-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
42eda524010894eb45e7c386b1e662be7bdffb3d2165d5b0642a4b66d19a0b1e
BLAKE2b-256 checksum
How to use checksums
6f556ed214612dc4f614dcfe774e996c6068f793b5e7d3ff302148f956991136
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

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

Download URL yggdrasil_engine-3.0.0a1-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
5d14b3b2cb4b599927b4bf712875c1dee5311c4e8470291364de6343acf56dc9
BLAKE2b-256 checksum
How to use checksums
ef5c7f0eefbff5a63014e818b6907f13235aeee44b4f26b983e469de905ae9b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

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

Download URL yggdrasil_engine-3.0.0a1-cp310-abi3-macosx_11_0_x86_64.whl
Size 1.2 MB
Tags CPython 3.10 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
4a4cf604cb07e65be265f5ddb591b7537344e38733d4c9ad1145e14bd8750848
BLAKE2b-256 checksum
How to use checksums
45c4bf8bf36e5d1fed7cf4a65405728271cf3898ce1387951d89f1d60664b131
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

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

Download URL yggdrasil_engine-3.0.0a1-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
231af3550d8d942715f2c8a52cb12d1d267def7aa30ab7128ca9d9dafe77f01e
BLAKE2b-256 checksum
How to use checksums
1121bd70d1ab88d95ec654ccd8644e34bb60415b71ad5acb6f43380d370bc0e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for yggdrasil-engine 3.0.0a1

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