OpenFeature flagd evaluator core implementation
Actively maintained. Last release 7 weeks ago, commits in 16 of the last 26 weeks. A safe choice.
$
pip install openfeature-flagd-coreOpenFeature flagd Core
Reference implementation of the flagd evaluator -- flag parsing, targeting rules (JSON logic), and custom operators (fractional, sem_ver, starts_with, ends_with). Mirrors the Java flagd-core module.
It is part of the OpenFeature Python SDK contrib project.
Installation
pip install openfeature-flagd-core
Usage
from openfeature.contrib.tools.flagd.core import FlagdCore
core = FlagdCore()
core.set_flags(
'{"flags": {"my-flag": {"state": "ENABLED", "variants": {"on": true}, "defaultVariant": "on"}}}'
)
result = core.resolve_boolean_value("my-flag", False)
License
Apache 2.0 - See LICENSE for details.