コード例 #1
0
def evaluate(flag, user, store, event_factory):
    sanitized_user = stringify_attrs(
        user, __USER_ATTRS_TO_STRINGIFY_FOR_EVALUATION__)
    prereq_events = []
    detail = _evaluate(flag, sanitized_user, store, prereq_events,
                       event_factory)
    return EvalResult(detail=detail, events=prereq_events)
コード例 #2
0
ファイル: flag.py プロジェクト: benpagedelphix/python-client
def evaluate(flag, user, store, include_reasons_in_events=False):
    sanitized_user = stringify_attrs(
        user, __USER_ATTRS_TO_STRINGIFY_FOR_EVALUATION__)
    prereq_events = []
    detail = _evaluate(flag, sanitized_user, store, prereq_events,
                       include_reasons_in_events)
    return EvalResult(detail=detail, events=prereq_events)
コード例 #3
0
def evaluate(flag, user, store, event_factory):
    sanitized_user = stringify_attrs(
        user, __USER_ATTRS_TO_STRINGIFY_FOR_EVALUATION__)
    value = flag.get('value')
    version = flag.get('version')
    variation_index = flag.get('variation')
    reason = flag.get('reason')
    detail = EvaluationDetail(value, variation_index, reason)

    return EvalResult(detail=detail, events=None)
コード例 #4
0
 def _process_user(self, event):
     filtered = self._user_filter.filter_user_props(event['user'])
     return stringify_attrs(filtered, __USER_ATTRS_TO_STRINGIFY_FOR_EVENTS__)
コード例 #5
0
ファイル: flag.py プロジェクト: launchdarkly/python-client
def evaluate(flag, user, store, include_reasons_in_events = False):
    sanitized_user = stringify_attrs(user, __USER_ATTRS_TO_STRINGIFY_FOR_EVALUATION__)
    prereq_events = []
    detail = _evaluate(flag, sanitized_user, store, prereq_events, include_reasons_in_events)
    return EvalResult(detail = detail, events = prereq_events)