fb-python-sdk 1.1.10__py3-none-any.whl → 1.2.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.
- {fb_python_sdk-1.1.10.dist-info → fb_python_sdk-1.2.0.dist-info}/METADATA +1 -1
- {fb_python_sdk-1.1.10.dist-info → fb_python_sdk-1.2.0.dist-info}/RECORD +8 -8
- {fb_python_sdk-1.1.10.dist-info → fb_python_sdk-1.2.0.dist-info}/WHEEL +1 -1
- fbclient/client.py +4 -2
- fbclient/common_types.py +2 -2
- fbclient/evaluator.py +3 -1
- {fb_python_sdk-1.1.10.dist-info → fb_python_sdk-1.2.0.dist-info}/licenses/LICENSE +0 -0
- {fb_python_sdk-1.1.10.dist-info → fb_python_sdk-1.2.0.dist-info}/top_level.txt +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fb_python_sdk-1.
|
|
1
|
+
fb_python_sdk-1.2.0.dist-info/licenses/LICENSE,sha256=Pp1Gaxzlu2F3GAFJ314grnBHifZdIK7_ZvCFV_khanM,1064
|
|
2
2
|
fbclient/__init__.py,sha256=ApEOR6dqgunNQ1mCeazg28z69DNRzVpQS39ApQ8Mf2M,2193
|
|
3
3
|
fbclient/category.py,sha256=DzblPnzVwsPKK_FSnLkK3HyWXStbNdPiRfdgSoEODVY,1058
|
|
4
|
-
fbclient/client.py,sha256=
|
|
5
|
-
fbclient/common_types.py,sha256=
|
|
4
|
+
fbclient/client.py,sha256=xs0umr11WXNp3XwLFaEgr5clQUMIO7_gLqUu1QmseSs,21356
|
|
5
|
+
fbclient/common_types.py,sha256=ax28gg4IOowMPAF2NNiRDPAwtGS7OI3Yxj3vPoQaWOg,11882
|
|
6
6
|
fbclient/config.py,sha256=jP0QEoSKpUdvKdm2mjFpd_Vz0y2v5njFCQotasykbSs,9482
|
|
7
7
|
fbclient/data_storage.py,sha256=FEOeoPLUZ2G1xJCa59XYtIgzIFsuqZHLKs2nP_NO8QQ,4632
|
|
8
|
-
fbclient/evaluator.py,sha256=
|
|
8
|
+
fbclient/evaluator.py,sha256=up33tLT4Fg6ZhMDlmNPF681c5u4GfVLLYmW7hnrWHxE,12598
|
|
9
9
|
fbclient/event_processor.py,sha256=DW2J2VhTxEv1EdWrUfWWot6q6VFNSzeCw9qANPZESDU,11681
|
|
10
10
|
fbclient/event_types.py,sha256=0gorQ-RIjEw9OUYmV8MUoAgd4u1xlIVGayTeXkM-gAI,4597
|
|
11
11
|
fbclient/flag_change_notification.py,sha256=0JTd2w7nkgJtawKlnqmdB6JFQ_mcpLU2L3y_FNvdUQM,8664
|
|
@@ -21,7 +21,7 @@ fbclient/utils/http_client.py,sha256=1G9mGVvU4X166VFoQyL43ORvpzTVPGZCuoDve_R75j4
|
|
|
21
21
|
fbclient/utils/repeatable_task.py,sha256=mLkxlUkfHHmT5OOKlbh3vE1QrAH9JPecErvrwqsNgtc,1835
|
|
22
22
|
fbclient/utils/rwlock.py,sha256=BfgKYNwZ8y63yk-CphlFTCZ1-0Txh4XQ8Pzh2pohh5A,1159
|
|
23
23
|
fbclient/utils/variation_splitting_algorithm.py,sha256=4_qBeVANWIFPacifmV1zl_JZXywOd-wv1fQmnb8qyAE,864
|
|
24
|
-
fb_python_sdk-1.
|
|
25
|
-
fb_python_sdk-1.
|
|
26
|
-
fb_python_sdk-1.
|
|
27
|
-
fb_python_sdk-1.
|
|
24
|
+
fb_python_sdk-1.2.0.dist-info/METADATA,sha256=1p6vP6-tFCbYA3QFIYf8vD-MgOuS50oEyGdX-DKq0BE,15600
|
|
25
|
+
fb_python_sdk-1.2.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
26
|
+
fb_python_sdk-1.2.0.dist-info/top_level.txt,sha256=m0lqkwRY4CCAR7ABfB47YE1I62JGd4v0yixam1hlTZk,9
|
|
27
|
+
fb_python_sdk-1.2.0.dist-info/RECORD,,
|
fbclient/client.py
CHANGED
|
@@ -133,6 +133,8 @@ class FBClient:
|
|
|
133
133
|
|
|
134
134
|
def _send_event_safely(self, event):
|
|
135
135
|
try:
|
|
136
|
+
if isinstance(event, FlagEvent) and not event.is_send_event:
|
|
137
|
+
return
|
|
136
138
|
if not self._closed:
|
|
137
139
|
self._event_processor.send_event(event)
|
|
138
140
|
except Exception:
|
|
@@ -273,7 +275,7 @@ class FBClient:
|
|
|
273
275
|
def variation(self, key: str, user: dict, default: Any = None) -> Any:
|
|
274
276
|
"""Return the variation of a feature flag for a given user.
|
|
275
277
|
|
|
276
|
-
This method
|
|
278
|
+
This method collects an evaluation event if evaluation succeeds and insights are enabled for the flag.
|
|
277
279
|
|
|
278
280
|
The default value should be a string, boolean, numeric, or json type.
|
|
279
281
|
|
|
@@ -297,7 +299,7 @@ class FBClient:
|
|
|
297
299
|
""""Return the variation of a feature flag for a given user, but also provides additional information
|
|
298
300
|
about how this value was calculated, in the property `data` of the :class:`fbclient.common_types.EvalDetail`.
|
|
299
301
|
|
|
300
|
-
This method
|
|
302
|
+
This method collects an evaluation event if evaluation succeeds and insights are enabled for the flag.
|
|
301
303
|
|
|
302
304
|
The default value should be a string, boolean, numeric, or json type.
|
|
303
305
|
|
fbclient/common_types.py
CHANGED
|
@@ -232,7 +232,7 @@ class AllFlagStates(BasicFlagState, Jsonfy):
|
|
|
232
232
|
def get_variation(self, key_name: str, default: Any = None) -> Any:
|
|
233
233
|
"""Return the variation of a given feature flag key
|
|
234
234
|
|
|
235
|
-
This method
|
|
235
|
+
This method submits the evaluation event only if insights were enabled when the flag was evaluated.
|
|
236
236
|
|
|
237
237
|
The default value should be a string, boolean, numeric, or json type.
|
|
238
238
|
|
|
@@ -244,7 +244,7 @@ class AllFlagStates(BasicFlagState, Jsonfy):
|
|
|
244
244
|
def get(self, key_name: str, default: Any = None) -> EvalDetail:
|
|
245
245
|
"""Return the flag evaluation details of a given feature flag key
|
|
246
246
|
|
|
247
|
-
This method
|
|
247
|
+
This method submits the evaluation event only if insights were enabled when the flag was evaluated.
|
|
248
248
|
|
|
249
249
|
The default value should be a string, boolean, numeric, or json type.
|
|
250
250
|
|
fbclient/evaluator.py
CHANGED
|
@@ -95,7 +95,9 @@ class Evaluator:
|
|
|
95
95
|
finally:
|
|
96
96
|
if er is not None:
|
|
97
97
|
log.info('FB Python SDK: User %s, Feature Flag %s, Flag Value %s' % (user.get('KeyId'), er.key_name, er.value))
|
|
98
|
-
|
|
98
|
+
# Match the server default: only an explicit boolean false
|
|
99
|
+
# disables insights; evaluation and experiment eligibility stay unchanged.
|
|
100
|
+
if fb_event is not None and flag.get('insightsEnabled') is not False:
|
|
99
101
|
fb_event.add(FlagEventVariation(er))
|
|
100
102
|
|
|
101
103
|
# return a value when flag is off
|
|
File without changes
|
|
File without changes
|