No project description provided
Project description
rust_decider
Rust implementation of bucketing, targeting, overrides, and dynamic config logic.
Usage
# In a virtualenv, python >= 3.7
$ pip install -r requirements-dev.txt
$ maturin develop
$ python
import rust_decider
# Init decider
decider = rust_decider.init("darkmode fractional_availability value", "../cfg.json")
# Bucketing needs a context
ctx = rust_decider.make_ctx({"user_id": "8"})
# Get a decision
x = decider.choose("exp_1", ctx)
assert x.err() is None # check for errors
x.decision() # get the variant
# Get a dynamic config value
y = decider.get_map("dc_map", ctx) # fetch a map DC
assert y.err() is None # check for errors
y.val() # get the actual map itself
Development
cd decider-py/
and run maturin develop
to build reddit-decider
python wheel.
Publishing
Package is automatically published on merge to master to https://pypi.org/project/reddit-decider/ via drone pipeline.
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
Built Distributions
File details
Details for the file reddit_decider-1.2.19.tar.gz
.
File metadata
- Download URL: reddit_decider-1.2.19.tar.gz
- Upload date:
- Size: 42.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e088694106da26511918da3047c147eca743dead49ceecc85cfc7519f5f7a3e1 |
|
MD5 | 7f8024e99f28136889b7f74901e129ca |
|
BLAKE2b-256 | 9e7e1cdea204779bd95d47cbdd9827ca3a4291c67ee774d754c75d4f6b12d566 |
File details
Details for the file reddit_decider-1.2.19-cp37-abi3-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: reddit_decider-1.2.19-cp37-abi3-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 460.2 kB
- Tags: CPython 3.7+, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 576ec3da6f072d289244a908d141080fdaaac6942dee819402c3105b6b39c67b |
|
MD5 | 7965b2cf395321d46ded22b4067c3978 |
|
BLAKE2b-256 | 59f9393c9960822afbe1a9b7801f0bceed5caea3a75c81c6f851a2d77c09aba3 |
File details
Details for the file reddit_decider-1.2.19-cp37-abi3-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: reddit_decider-1.2.19-cp37-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 427.7 kB
- Tags: CPython 3.7+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c7b9ea1c02b81567246105be943afb706d02bbdde492f6ae921a198c43e7dc4 |
|
MD5 | 8a60bfbd17923b3604ac530c6c283780 |
|
BLAKE2b-256 | 8855d1ebe85ad5244456d541cf2072f4cf4db6191f881af93edbbb3293a1cc24 |
File details
Details for the file reddit_decider-1.2.19-cp37-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: reddit_decider-1.2.19-cp37-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 381.4 kB
- Tags: CPython 3.7+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81a419de39083179236fd41dc91352f202e5d85a7219facb931646876fc91554 |
|
MD5 | bf0418d16dc974432ef42ef918781f41 |
|
BLAKE2b-256 | a35456b688844c2daa15d3966ba660b273192adee011421e131a5d63a43c6cc8 |
File details
Details for the file reddit_decider-1.2.19-cp37-abi3-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: reddit_decider-1.2.19-cp37-abi3-macosx_10_7_x86_64.whl
- Upload date:
- Size: 408.5 kB
- Tags: CPython 3.7+, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80923924cd1f3f5708a521bf9656164f89e8fa25cec384ae4196174b64da752e |
|
MD5 | 98a5ef6d6ee3aec5efaf6d61e4bc35df |
|
BLAKE2b-256 | 1951a59c20ce196454dd0828a1e94a20ded97a88b5eee8660bd5ad7db5e4f236 |