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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for reddit_decider-1.0.9-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fc90290b7d40bdc1299675a2dd8ce95bdb1f2bbd5e59b57d56f206295f6fce9 |
|
MD5 | 7a41c84757e32f52fbaf1402eefe1729 |
|
BLAKE2b-256 | 535f3f7fe8745bbff69ae0a21f12ebd1af187356bd89007b984bf296550efd91 |