featbit-openfeature-server 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ from featbit_openfeature.provider import FeatBitProvider
2
+
3
+
4
+ __all__ = ["FeatBitProvider"]
@@ -0,0 +1 @@
1
+ """Internal converters used by the FeatBit OpenFeature provider."""
@@ -0,0 +1,74 @@
1
+ from __future__ import annotations
2
+
3
+ import logging
4
+ from datetime import datetime, timezone
5
+ from typing import Any
6
+
7
+ from openfeature.evaluation_context import EvaluationContext
8
+ from openfeature.exception import TargetingKeyMissingError
9
+
10
+
11
+ logger = logging.getLogger("featbit-openfeature-server")
12
+
13
+ _RESERVED_ATTRIBUTES = {"key", "keyid", "targetingKey", "name"}
14
+
15
+
16
+ class EvaluationContextConverter:
17
+ """Converts an OpenFeature evaluation context to a FeatBit user mapping."""
18
+
19
+ def to_fb_user(self, context: EvaluationContext | None) -> dict[str, Any]:
20
+ if context is None:
21
+ raise TargetingKeyMissingError("evaluation context is required")
22
+
23
+ attributes = dict(context.attributes)
24
+ targeting_key = self._targeting_key(context, attributes)
25
+ name = attributes.get("name")
26
+ if not self._is_non_empty_string(name):
27
+ if name is not None:
28
+ logger.warning("FeatBit user name must be a non-empty string; using targeting key")
29
+ name = targeting_key
30
+
31
+ user: dict[str, Any] = {"key": targeting_key, "name": name}
32
+ for key, value in attributes.items():
33
+ if not isinstance(key, str) or key in _RESERVED_ATTRIBUTES:
34
+ continue
35
+
36
+ converted = self._convert_attribute(value)
37
+ if converted is _UNSUPPORTED_ATTRIBUTE:
38
+ logger.debug("Ignoring unsupported structured EvaluationContext attribute %r", key)
39
+ continue
40
+ user[key] = converted
41
+
42
+ return user
43
+
44
+ @classmethod
45
+ def _targeting_key(
46
+ cls, context: EvaluationContext, attributes: dict[str, Any]
47
+ ) -> str:
48
+ if cls._is_non_empty_string(context.targeting_key):
49
+ return context.targeting_key # type: ignore[return-value]
50
+
51
+ attribute_key = attributes.get("key")
52
+ if cls._is_non_empty_string(attribute_key):
53
+ return attribute_key
54
+
55
+ raise TargetingKeyMissingError(
56
+ "evaluation context must contain a non-empty targeting key"
57
+ )
58
+
59
+ @staticmethod
60
+ def _is_non_empty_string(value: Any) -> bool:
61
+ return isinstance(value, str) and bool(value.strip())
62
+
63
+ @staticmethod
64
+ def _convert_attribute(value: Any) -> Any:
65
+ if isinstance(value, datetime):
66
+ if value.tzinfo is None:
67
+ value = value.replace(tzinfo=timezone.utc)
68
+ return value.isoformat()
69
+ if isinstance(value, (str, bool, int, float)):
70
+ return value
71
+ return _UNSUPPORTED_ATTRIBUTE
72
+
73
+
74
+ _UNSUPPORTED_ATTRIBUTE = object()
@@ -0,0 +1,59 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+
5
+ from fbclient.common_types import EvalDetail
6
+ from fbclient.evaluator import (
7
+ REASON_CLIENT_NOT_READY,
8
+ REASON_ERROR,
9
+ REASON_FLAG_NOT_FOUND,
10
+ REASON_FLAG_OFF,
11
+ REASON_RULE_MATCH,
12
+ REASON_TARGET_MATCH,
13
+ REASON_USER_NOT_SPECIFIED,
14
+ REASON_WRONG_TYPE,
15
+ )
16
+ from openfeature.exception import ErrorCode
17
+ from openfeature.flag_evaluation import FlagResolutionDetails, Reason
18
+
19
+
20
+ _STANDARD_REASONS = {
21
+ REASON_FLAG_OFF: Reason.DISABLED,
22
+ REASON_TARGET_MATCH: Reason.TARGETING_MATCH,
23
+ REASON_RULE_MATCH: Reason.TARGETING_MATCH,
24
+ }
25
+
26
+ _ERROR_CODES = {
27
+ REASON_CLIENT_NOT_READY: ErrorCode.PROVIDER_NOT_READY,
28
+ REASON_FLAG_NOT_FOUND: ErrorCode.FLAG_NOT_FOUND,
29
+ REASON_USER_NOT_SPECIFIED: ErrorCode.TARGETING_KEY_MISSING,
30
+ REASON_WRONG_TYPE: ErrorCode.TYPE_MISMATCH,
31
+ REASON_ERROR: ErrorCode.GENERAL,
32
+ }
33
+
34
+
35
+ class ResolutionDetailsConverter:
36
+ """Converts FeatBit evaluation details to OpenFeature resolution details."""
37
+
38
+ def to_resolution_details(
39
+ self, result: EvalDetail, resolved_value: Any
40
+ ) -> FlagResolutionDetails[Any]:
41
+ raw_reason = result.reason or ""
42
+ error_code = _ERROR_CODES.get(raw_reason)
43
+
44
+ if error_code is not None:
45
+ reason: str | Reason = Reason.ERROR
46
+ error_message = raw_reason
47
+ variant = None
48
+ else:
49
+ reason = _STANDARD_REASONS.get(raw_reason, raw_reason or Reason.UNKNOWN)
50
+ error_message = None
51
+ variant = result.variation_id
52
+
53
+ return FlagResolutionDetails(
54
+ value=resolved_value,
55
+ error_code=error_code,
56
+ error_message=error_message,
57
+ reason=reason,
58
+ variant=variant,
59
+ )
@@ -0,0 +1,328 @@
1
+ from __future__ import annotations
2
+
3
+ import logging
4
+ import threading
5
+ from collections.abc import Mapping, Sequence
6
+ from typing import Any
7
+
8
+ from fbclient.client import FBClient
9
+ from fbclient.flag_change_notification import FlagChangedListener, FlagChangedNotice
10
+ from fbclient.status_types import State, StateType
11
+ from openfeature.evaluation_context import EvaluationContext
12
+ from openfeature.event import ProviderEventDetails
13
+ from openfeature.exception import (
14
+ ErrorCode,
15
+ ProviderFatalError,
16
+ ProviderNotReadyError,
17
+ TargetingKeyMissingError,
18
+ )
19
+ from openfeature.flag_evaluation import (
20
+ FlagResolutionDetails,
21
+ FlagType,
22
+ FlagValueType,
23
+ Reason,
24
+ )
25
+ from openfeature.provider import AbstractProvider
26
+ from openfeature.provider.metadata import Metadata
27
+ from openfeature.track import TrackingEventDetails
28
+
29
+ from featbit_openfeature.impl.context_converter import EvaluationContextConverter
30
+ from featbit_openfeature.impl.details_converter import ResolutionDetailsConverter
31
+
32
+
33
+ logger = logging.getLogger("featbit-openfeature-server")
34
+
35
+ _TYPE_MISMATCH = object()
36
+
37
+
38
+ class _FlagChangeListener(FlagChangedListener):
39
+ def __init__(self, callback: Any):
40
+ self._callback = callback
41
+
42
+ def on_flag_change(self, notice: FlagChangedNotice):
43
+ self._callback(notice.flag_key)
44
+
45
+
46
+ class FeatBitProvider(AbstractProvider):
47
+ """OpenFeature provider backed by an existing thread-safe ``FBClient``.
48
+
49
+ The provider owns the injected client's lifecycle. ``shutdown`` removes
50
+ its listeners and stops the client so queued events and background
51
+ resources are released with the OpenFeature lifecycle.
52
+ """
53
+
54
+ def __init__(self, client: FBClient, initialization_timeout: float = 15.0):
55
+ super().__init__()
56
+ if client is None:
57
+ raise ValueError("client is required")
58
+ if initialization_timeout <= 0:
59
+ raise ValueError("initialization_timeout must be greater than zero")
60
+
61
+ self._client = client
62
+ self._initialization_timeout = initialization_timeout
63
+ self._context_converter = EvaluationContextConverter()
64
+ self._details_converter = ResolutionDetailsConverter()
65
+ self._lifecycle_lock = threading.Lock()
66
+ self._shutdown_started = False
67
+ self._flag_change_listener: _FlagChangeListener | None = None
68
+ self._status_listener_registered = False
69
+
70
+ @property
71
+ def client(self) -> FBClient:
72
+ """Return the FeatBit client supplied to this provider."""
73
+ return self._client
74
+
75
+ def initialize(self, evaluation_context: EvaluationContext) -> None:
76
+ # Register before waiting so a client that connects just after an
77
+ # initialization timeout can still publish its recovery to OpenFeature.
78
+ self._register_listeners()
79
+ with self._lifecycle_lock:
80
+ if self._shutdown_started:
81
+ raise ProviderFatalError("FeatBit provider is shut down")
82
+
83
+ ready = self._client.update_status_provider.wait_for_OKState(
84
+ self._initialization_timeout
85
+ )
86
+ if not ready:
87
+ state = self._client.update_status_provider.current_state
88
+ message = self._state_message(state)
89
+ if state.state_type == StateType.OFF:
90
+ raise ProviderFatalError(message)
91
+ raise ProviderNotReadyError(message)
92
+
93
+ def shutdown(self) -> None:
94
+ with self._lifecycle_lock:
95
+ self._shutdown_started = True
96
+ flag_listener = self._flag_change_listener
97
+ status_listener_registered = self._status_listener_registered
98
+
99
+ if flag_listener is not None:
100
+ try:
101
+ self._client.flag_tracker.remove_flag_change_notifier(flag_listener)
102
+ except Exception:
103
+ logger.exception("Failed to remove FeatBit flag change listener")
104
+ else:
105
+ with self._lifecycle_lock:
106
+ if self._flag_change_listener is flag_listener:
107
+ self._flag_change_listener = None
108
+
109
+ if status_listener_registered:
110
+ try:
111
+ self._client.update_status_provider.remove_listener(
112
+ self._handle_data_update_status
113
+ )
114
+ except Exception:
115
+ logger.exception("Failed to remove FeatBit status listener")
116
+ else:
117
+ with self._lifecycle_lock:
118
+ self._status_listener_registered = False
119
+
120
+ try:
121
+ self._client.stop()
122
+ except Exception:
123
+ # Provider shutdown is application lifecycle code; an extension
124
+ # failure in the underlying SDK must not escape into OpenFeature.
125
+ logger.exception("Failed to stop FeatBit client")
126
+
127
+ def get_metadata(self) -> Metadata:
128
+ return Metadata("featbit-openfeature-server")
129
+
130
+ def resolve_boolean_details(
131
+ self,
132
+ flag_key: str,
133
+ default_value: bool,
134
+ evaluation_context: EvaluationContext | None = None,
135
+ ) -> FlagResolutionDetails[bool]:
136
+ return self._resolve_value(
137
+ FlagType.BOOLEAN, flag_key, default_value, evaluation_context
138
+ )
139
+
140
+ def resolve_string_details(
141
+ self,
142
+ flag_key: str,
143
+ default_value: str,
144
+ evaluation_context: EvaluationContext | None = None,
145
+ ) -> FlagResolutionDetails[str]:
146
+ return self._resolve_value(
147
+ FlagType.STRING, flag_key, default_value, evaluation_context
148
+ )
149
+
150
+ def resolve_integer_details(
151
+ self,
152
+ flag_key: str,
153
+ default_value: int,
154
+ evaluation_context: EvaluationContext | None = None,
155
+ ) -> FlagResolutionDetails[int]:
156
+ return self._resolve_value(
157
+ FlagType.INTEGER, flag_key, default_value, evaluation_context
158
+ )
159
+
160
+ def resolve_float_details(
161
+ self,
162
+ flag_key: str,
163
+ default_value: float,
164
+ evaluation_context: EvaluationContext | None = None,
165
+ ) -> FlagResolutionDetails[float]:
166
+ return self._resolve_value(
167
+ FlagType.FLOAT, flag_key, default_value, evaluation_context
168
+ )
169
+
170
+ def resolve_object_details(
171
+ self,
172
+ flag_key: str,
173
+ default_value: Sequence[FlagValueType] | Mapping[str, FlagValueType],
174
+ evaluation_context: EvaluationContext | None = None,
175
+ ) -> FlagResolutionDetails[
176
+ Sequence[FlagValueType] | Mapping[str, FlagValueType]
177
+ ]:
178
+ return self._resolve_value(
179
+ FlagType.OBJECT, flag_key, default_value, evaluation_context
180
+ )
181
+
182
+ def track(
183
+ self,
184
+ tracking_event_name: str,
185
+ evaluation_context: EvaluationContext | None = None,
186
+ tracking_event_details: TrackingEventDetails | None = None,
187
+ ) -> None:
188
+ try:
189
+ user = self._context_converter.to_fb_user(evaluation_context)
190
+ metric_value = 1.0
191
+ if tracking_event_details is not None:
192
+ if tracking_event_details.attributes:
193
+ logger.debug(
194
+ "FeatBit track_metric does not support tracking attributes; "
195
+ "ignoring them"
196
+ )
197
+ if tracking_event_details.value is not None:
198
+ metric_value = float(tracking_event_details.value)
199
+ self._client.track_metric(user, tracking_event_name, metric_value)
200
+ except TargetingKeyMissingError:
201
+ logger.warning("Ignoring FeatBit tracking call without a targeting key")
202
+ except Exception:
203
+ logger.exception("FeatBit tracking failed")
204
+
205
+ def _resolve_value(
206
+ self,
207
+ flag_type: FlagType,
208
+ flag_key: str,
209
+ default_value: Any,
210
+ evaluation_context: EvaluationContext | None,
211
+ ) -> FlagResolutionDetails[Any]:
212
+ try:
213
+ user = self._context_converter.to_fb_user(evaluation_context)
214
+ result = self._client.variation_detail(flag_key, user, default_value)
215
+ resolved_value = self._validate_and_cast_value(
216
+ flag_type, result.variation
217
+ )
218
+ if resolved_value is _TYPE_MISMATCH:
219
+ return self._type_mismatch_details(default_value)
220
+ return self._details_converter.to_resolution_details(
221
+ result, resolved_value
222
+ )
223
+ except TargetingKeyMissingError as error:
224
+ return FlagResolutionDetails(
225
+ value=default_value,
226
+ reason=Reason.ERROR,
227
+ error_code=ErrorCode.TARGETING_KEY_MISSING,
228
+ error_message=error.error_message,
229
+ )
230
+ except Exception:
231
+ logger.exception("FeatBit flag evaluation failed")
232
+ return FlagResolutionDetails(
233
+ value=default_value,
234
+ reason=Reason.ERROR,
235
+ error_code=ErrorCode.GENERAL,
236
+ error_message="FeatBit flag evaluation failed",
237
+ )
238
+
239
+ @staticmethod
240
+ def _validate_and_cast_value(flag_type: FlagType, value: Any) -> Any:
241
+ if flag_type == FlagType.BOOLEAN and isinstance(value, bool):
242
+ return value
243
+ if flag_type == FlagType.STRING and isinstance(value, str):
244
+ return value
245
+ if (
246
+ flag_type == FlagType.INTEGER
247
+ and isinstance(value, (int, float))
248
+ and not isinstance(value, bool)
249
+ ):
250
+ return int(value)
251
+ if (
252
+ flag_type == FlagType.FLOAT
253
+ and isinstance(value, (int, float))
254
+ and not isinstance(value, bool)
255
+ ):
256
+ return float(value)
257
+ if flag_type == FlagType.OBJECT and isinstance(value, (dict, list)):
258
+ return value
259
+ return _TYPE_MISMATCH
260
+
261
+ @staticmethod
262
+ def _type_mismatch_details(default_value: Any) -> FlagResolutionDetails[Any]:
263
+ return FlagResolutionDetails(
264
+ value=default_value,
265
+ reason=Reason.ERROR,
266
+ error_code=ErrorCode.TYPE_MISMATCH,
267
+ error_message="FeatBit flag value does not match the requested type",
268
+ )
269
+
270
+ def _register_listeners(self) -> None:
271
+ with self._lifecycle_lock:
272
+ if self._shutdown_started:
273
+ return
274
+
275
+ if not self._status_listener_registered:
276
+ try:
277
+ self._client.update_status_provider.add_listener(
278
+ self._handle_data_update_status
279
+ )
280
+ except Exception:
281
+ logger.exception("Failed to register FeatBit status listener")
282
+ else:
283
+ self._status_listener_registered = True
284
+
285
+ if self._flag_change_listener is None:
286
+ listener = _FlagChangeListener(self._emit_configuration_changed)
287
+ try:
288
+ self._client.flag_tracker.add_flag_changed_listener(listener)
289
+ except Exception:
290
+ logger.exception("Failed to register FeatBit flag change listener")
291
+ else:
292
+ self._flag_change_listener = listener
293
+
294
+ def _emit_configuration_changed(self, flag_key: str) -> None:
295
+ try:
296
+ self.emit_provider_configuration_changed(
297
+ ProviderEventDetails(flags_changed=[flag_key])
298
+ )
299
+ except Exception:
300
+ logger.exception("Failed to emit OpenFeature configuration change event")
301
+
302
+ def _handle_data_update_status(self, state: State) -> None:
303
+ try:
304
+ with self._lifecycle_lock:
305
+ if self._shutdown_started:
306
+ return
307
+ if state.state_type == StateType.OK:
308
+ self.emit_provider_ready(ProviderEventDetails())
309
+ elif state.state_type == StateType.INTERRUPTED:
310
+ self.emit_provider_stale(
311
+ ProviderEventDetails(message=self._state_message(state))
312
+ )
313
+ elif state.state_type == StateType.OFF:
314
+ self.emit_provider_error(
315
+ ProviderEventDetails(
316
+ error_code=ErrorCode.PROVIDER_FATAL,
317
+ message=self._state_message(state),
318
+ )
319
+ )
320
+ except Exception:
321
+ logger.exception("Failed to emit OpenFeature provider status event")
322
+
323
+ @staticmethod
324
+ def _state_message(state: Any) -> str:
325
+ error = getattr(state, "error_track", None)
326
+ message = getattr(error, "message", None)
327
+ state_type = getattr(getattr(state, "state_type", None), "name", "UNKNOWN")
328
+ return message or f"FeatBit data source state is {state_type}"
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,143 @@
1
+ Metadata-Version: 2.4
2
+ Name: featbit-openfeature-server
3
+ Version: 0.1.0
4
+ Summary: OpenFeature provider for the FeatBit Python server SDK
5
+ Author: FeatBit
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/featbit/openfeature-provider-python-server
8
+ Project-URL: Issues, https://github.com/featbit/openfeature-provider-python-server/issues
9
+ Requires-Python: <3.15,>=3.10
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: openfeature-sdk<1,>=0.10
13
+ Requires-Dist: fb-python-sdk<2,>=1.1.10
14
+ Provides-Extra: dev
15
+ Requires-Dist: build<2,>=1; extra == "dev"
16
+ Requires-Dist: flake8<8,>=7; extra == "dev"
17
+ Requires-Dist: pytest<10,>=8; extra == "dev"
18
+ Dynamic: license-file
19
+
20
+ # FeatBit OpenFeature Provider for Python Server SDK
21
+
22
+ Thin OpenFeature provider backed by an existing FeatBit Python Server SDK client.
23
+ The provider converts OpenFeature evaluation contexts and resolution details; feature
24
+ flag synchronization, local evaluation, and insight events remain owned by
25
+ `fb-python-sdk`.
26
+
27
+ ## Installation
28
+
29
+ ```shell
30
+ pip install featbit-openfeature-server
31
+ ```
32
+
33
+ The provider supports Python 3.10–3.14 and requires `fb-python-sdk>=1.1.10`,
34
+ which exposes variation IDs and data-update status listeners.
35
+
36
+ ## Usage
37
+
38
+ ```python
39
+ from fbclient.client import FBClient
40
+ from fbclient.config import Config
41
+ from openfeature import api
42
+ from openfeature.evaluation_context import EvaluationContext
43
+
44
+ from featbit_openfeature import FeatBitProvider
45
+
46
+ fb_client = FBClient(
47
+ Config(
48
+ "server-side-environment-secret",
49
+ event_url="https://app-eval.featbit.co",
50
+ streaming_url="wss://app-eval.featbit.co",
51
+ ),
52
+ start_wait=0,
53
+ )
54
+
55
+ api.set_provider_and_wait(FeatBitProvider(fb_client))
56
+ client = api.get_client()
57
+
58
+ details = client.get_boolean_details(
59
+ "new-checkout",
60
+ False,
61
+ EvaluationContext(
62
+ targeting_key="user-123",
63
+ attributes={"name": "Alice", "plan": "beta"},
64
+ ),
65
+ )
66
+
67
+ print(details.value, details.reason, details.variant)
68
+
69
+ api.shutdown()
70
+ ```
71
+
72
+ The provider owns the injected `FBClient`. Calling `api.shutdown()` removes
73
+ provider listeners and stops the FeatBit client so queued events are flushed
74
+ and background resources are released.
75
+
76
+ ## Supported mappings
77
+
78
+ - Boolean, string, integer, float, and object resolution.
79
+ - OpenFeature targeting key and scalar attributes to a FeatBit user dictionary.
80
+ - FeatBit reasons and failures to OpenFeature `Reason` and `ErrorCode`.
81
+ - FeatBit variation ID to OpenFeature `variant`.
82
+ - FeatBit flag changes to `PROVIDER_CONFIGURATION_CHANGED`.
83
+ - FeatBit runtime data-source status to OpenFeature provider status.
84
+ - OpenFeature tracking value to `FBClient.track_metric()`.
85
+
86
+ Structured evaluation-context attributes and tracking custom attributes are not
87
+ supported by the current FeatBit user and metric schemas. They are ignored rather
88
+ than represented inaccurately.
89
+
90
+ ## Provider status
91
+
92
+ Applications can read the status through the standard OpenFeature client:
93
+
94
+ ```python
95
+ from openfeature.provider import ProviderStatus
96
+
97
+ status = client.get_provider_status()
98
+ assert status in {
99
+ ProviderStatus.NOT_READY,
100
+ ProviderStatus.READY,
101
+ ProviderStatus.STALE,
102
+ ProviderStatus.ERROR,
103
+ ProviderStatus.FATAL,
104
+ }
105
+ ```
106
+
107
+ FeatBit states are mapped as follows:
108
+
109
+ | FeatBit state | OpenFeature status |
110
+ | --- | --- |
111
+ | initializing | `NOT_READY` during provider initialization |
112
+ | OK | `READY` |
113
+ | interrupted | `STALE` |
114
+ | off observed while provider is active | `FATAL` |
115
+
116
+ After `api.shutdown()`, OpenFeature removes this provider and installs its default
117
+ no-op provider. Status after that point belongs to the OpenFeature SDK rather than
118
+ to FeatBit.
119
+
120
+ The included `py.typed` marker declares this package as PEP 561 typed, allowing
121
+ type checkers to use the annotations shipped with the provider after install.
122
+
123
+ ## Development tests
124
+
125
+ Unit tests use mocks, and the integration test uses FeatBit offline data. Neither
126
+ requires a FeatBit account.
127
+
128
+ ```shell
129
+ python -m pytest -q
130
+ python -m flake8 featbit_openfeature tests
131
+ python -m build
132
+ ```
133
+
134
+ ## Release
135
+
136
+ Publishing is handled by `.github/workflows/release.yml` when a GitHub Release
137
+ is published. The build and publish jobs are separated so package build code
138
+ never receives an OpenID Connect token. The publish job uses PyPI Trusted
139
+ Publishing and does not store a long-lived PyPI password in GitHub.
140
+
141
+ Before the first release, configure the PyPI trusted publisher with owner
142
+ `featbit`, repository `openfeature-provider-python-server`, workflow
143
+ `release.yml`, and GitHub environment `pypi`.
@@ -0,0 +1,11 @@
1
+ featbit_openfeature/__init__.py,sha256=hO8RxsznX7SjUphdR80vazz6-HSmAZmKCXzsYH57w6U,89
2
+ featbit_openfeature/provider.py,sha256=QImk004ztjTG5kzCBEpXAGSo5IwaheAhYK0v66t6eTU,12576
3
+ featbit_openfeature/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
4
+ featbit_openfeature/impl/__init__.py,sha256=lBt2NE4fQQtbkRKWDCtakYiESCoWDbIRt8TtRLrRfQ8,68
5
+ featbit_openfeature/impl/context_converter.py,sha256=qL5zqhfT76XHiyCaPcZJqYPwl0969ZjQwxuEGI6N_M0,2558
6
+ featbit_openfeature/impl/details_converter.py,sha256=pMUxNDgPOIxD5ts9m-3cJNcz7nchDKjDfWQK1c-BFCw,1762
7
+ featbit_openfeature_server-0.1.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
8
+ featbit_openfeature_server-0.1.0.dist-info/METADATA,sha256=WHcf6AISIhje7AyRlVg2lpU9rGem9Fna5QCE65wJg5w,4535
9
+ featbit_openfeature_server-0.1.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
10
+ featbit_openfeature_server-0.1.0.dist-info/top_level.txt,sha256=rzxxb3sPhrSq16r7CSLZnl_VK4YQXBsVHUmB2VoVng0,20
11
+ featbit_openfeature_server-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1 @@
1
+ featbit_openfeature