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.17.tar.gz
(18.5 kB
view hashes)
Built Distributions
Close
Hashes for reddit_decider-1.0.17-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46bc5b7f30fc4a98aaf772c0f4fa217cfde215b972a2eef563fb24db2fe4e30f |
|
MD5 | b670b5bcd130e97cf605d2c1e5dd3879 |
|
BLAKE2b-256 | 26c76fb62f9b2eddf74660a8d9ff74add3f74d0412815d23e8ee1af8f2cb1017 |
Close
Hashes for reddit_decider-1.0.17-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c8faa6bdd5811bbcb1544aca3fe4e21085e5f133919d411952f8984fc263c2a |
|
MD5 | ccababb931ddb005c4bc33d6a46e194f |
|
BLAKE2b-256 | bae1e3a85c8293e6bd2d4ec0676e6ee81a7b9f0f02fc1008a71ebc74e71c834d |
Close
Hashes for reddit_decider-1.0.17-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a0ae5f522bcb9ebb0c534d3af8188548c84289c00bf5641bd6f0f0f2ee24f98 |
|
MD5 | 9a6913904edfba33bf82d93d53b62f37 |
|
BLAKE2b-256 | 20632658f82c7f0380f1a4edfe33f346ddda7bae62195d3ea396a84f14f49d2d |
Close
Hashes for reddit_decider-1.0.17-cp37-cp37m-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b20ad379dbb39188e3ee55175b45f8d36e4cf8bf071995946474ef19bc193ed9 |
|
MD5 | d73b2dea4561231e1924ee7a86ce5875 |
|
BLAKE2b-256 | d79cba6b2cd323f833dbaa081d7f617b217b1c2b52cfd44564c97e5f3f6376e1 |