No project description provided
Project description
rust_decider
Rust implementation of bucketing, targeting, overrides, and dynamic config logic.
Usage
source .env/bin/activate
maturin develop
python
import rust_decider
d = rust_decider.init("darkmode fractional_availability value", "../cfg.json")
d.printer() # prints yooo
ctx = rust_decider.make_ctx({"user_id": "8"})
x = d.choose("exp_1", ctx)
x.decision() # prints the variant!!!!
y = d.get_map("dc_map", ctx) # fetch a map DC
y.err() # check that error is empty
y.val() # get the actual map itself
Development
cd decider-py/
and run maturin develop
to build reddit-decider
python wheel.
Publishing
package in test.pypi.org: https://test.pypi.org/project/decider-py
Upload to test.pypi via:
maturin publish -r https://test.pypi.org/legacy/ --username mattknox --password “”
Download from test.pypi via:
pip3 install --index-url https://test.pypi.org/simple/ decider-py
Formatting / Linting
cargo fmt --manifest-path decider-py/test/Cargo.toml cargo clippy --manifest-path decider-py/test/Cargo.toml
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
reddit_decider-1.0.12.tar.gz
(18.6 kB
view hashes)
Built Distribution
Close
Hashes for reddit_decider-1.0.12-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 687702e5b4b1ea124a61699cfa5d883f5e75e45bee3d5c89a2554fc7c71f0cac |
|
MD5 | 5c6527c6050bb593789e7afb63c87669 |
|
BLAKE2b-256 | a4988f10574b83ef29428d6258b39c294aefbfcc5eca5d7c266b636a23b30ba1 |