devcycle-python-server-sdk 3.13.0__py3-none-any.whl → 3.13.1__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.
- devcycle_python_sdk/VERSION.txt +1 -1
- devcycle_python_sdk/models/user.py +3 -3
- devcycle_python_sdk/open_feature_provider/provider.py +7 -5
- {devcycle_python_server_sdk-3.13.0.dist-info → devcycle_python_server_sdk-3.13.1.dist-info}/METADATA +2 -2
- {devcycle_python_server_sdk-3.13.0.dist-info → devcycle_python_server_sdk-3.13.1.dist-info}/RECORD +9 -9
- {devcycle_python_server_sdk-3.13.0.dist-info → devcycle_python_server_sdk-3.13.1.dist-info}/licenses/LICENSE +1 -1
- example/openfeature_example.py +175 -14
- {devcycle_python_server_sdk-3.13.0.dist-info → devcycle_python_server_sdk-3.13.1.dist-info}/WHEEL +0 -0
- {devcycle_python_server_sdk-3.13.0.dist-info → devcycle_python_server_sdk-3.13.1.dist-info}/top_level.txt +0 -0
devcycle_python_sdk/VERSION.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.13.
|
|
1
|
+
3.13.1
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# ruff: noqa: N815
|
|
2
2
|
from dataclasses import dataclass, field
|
|
3
3
|
from datetime import datetime, timezone
|
|
4
|
-
from typing import Dict, Optional, Any
|
|
4
|
+
from typing import Dict, Optional, Any, cast
|
|
5
5
|
from openfeature.evaluation_context import EvaluationContext
|
|
6
6
|
from openfeature.exception import TargetingKeyMissingError, InvalidContextError
|
|
7
7
|
|
|
@@ -114,10 +114,10 @@ class DevCycleUser:
|
|
|
114
114
|
user_id = context.targeting_key
|
|
115
115
|
user_id_source = "targeting_key"
|
|
116
116
|
elif context.attributes and "user_id" in context.attributes.keys():
|
|
117
|
-
user_id = context.attributes["user_id"]
|
|
117
|
+
user_id = cast(str, context.attributes["user_id"])
|
|
118
118
|
user_id_source = "user_id"
|
|
119
119
|
elif context.attributes and "userId" in context.attributes.keys():
|
|
120
|
-
user_id = context.attributes["userId"]
|
|
120
|
+
user_id = cast(str, context.attributes["userId"])
|
|
121
121
|
user_id_source = "userId"
|
|
122
122
|
|
|
123
123
|
if not user_id:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import time
|
|
3
3
|
|
|
4
|
-
from typing import Any, Optional, Union, List
|
|
4
|
+
from typing import Any, Optional, Union, List, Mapping, Sequence
|
|
5
5
|
|
|
6
6
|
from devcycle_python_sdk import AbstractDevCycleClient
|
|
7
7
|
from devcycle_python_sdk.models.user import DevCycleUser
|
|
@@ -9,7 +9,7 @@ from devcycle_python_sdk.models.user import DevCycleUser
|
|
|
9
9
|
from openfeature.provider import AbstractProvider
|
|
10
10
|
from openfeature.provider.metadata import Metadata
|
|
11
11
|
from openfeature.evaluation_context import EvaluationContext
|
|
12
|
-
from openfeature.flag_evaluation import FlagResolutionDetails, Reason
|
|
12
|
+
from openfeature.flag_evaluation import FlagResolutionDetails, Reason, FlagValueType
|
|
13
13
|
from openfeature.exception import (
|
|
14
14
|
ErrorCode,
|
|
15
15
|
InvalidContextError,
|
|
@@ -138,10 +138,12 @@ class DevCycleProvider(AbstractProvider):
|
|
|
138
138
|
def resolve_object_details(
|
|
139
139
|
self,
|
|
140
140
|
flag_key: str,
|
|
141
|
-
default_value: Union[
|
|
141
|
+
default_value: Union[Mapping[str, FlagValueType], Sequence[FlagValueType]],
|
|
142
142
|
evaluation_context: Optional[EvaluationContext] = None,
|
|
143
|
-
) -> FlagResolutionDetails[
|
|
144
|
-
|
|
143
|
+
) -> FlagResolutionDetails[
|
|
144
|
+
Union[Mapping[str, FlagValueType], Sequence[FlagValueType]]
|
|
145
|
+
]:
|
|
146
|
+
if not isinstance(default_value, Mapping):
|
|
145
147
|
raise TypeMismatchError("Default value must be a flat dictionary")
|
|
146
148
|
|
|
147
149
|
if default_value:
|
{devcycle_python_server_sdk-3.13.0.dist-info → devcycle_python_server_sdk-3.13.1.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: devcycle-python-server-sdk
|
|
3
|
-
Version: 3.13.
|
|
3
|
+
Version: 3.13.1
|
|
4
4
|
Summary: DevCycle Python SDK
|
|
5
5
|
Home-page: https://github.com/devcycleHQ/python-server-sdk
|
|
6
6
|
Author-email:
|
|
@@ -12,7 +12,7 @@ Requires-Dist: urllib3>=1.15.1
|
|
|
12
12
|
Requires-Dist: requests>=2.32
|
|
13
13
|
Requires-Dist: wasmtime~=30.0.0
|
|
14
14
|
Requires-Dist: protobuf>=4.23.3
|
|
15
|
-
Requires-Dist: openfeature-sdk
|
|
15
|
+
Requires-Dist: openfeature-sdk~=0.8.0
|
|
16
16
|
Requires-Dist: launchdarkly-eventsource>=1.2.1
|
|
17
17
|
Requires-Dist: responses>=0.23.1
|
|
18
18
|
Dynamic: description
|
{devcycle_python_server_sdk-3.13.0.dist-info → devcycle_python_server_sdk-3.13.1.dist-info}/RECORD
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
devcycle_python_sdk/VERSION.txt,sha256=
|
|
1
|
+
devcycle_python_sdk/VERSION.txt,sha256=d1t-sfDGOHao5o2Fv5VaJziw754bHVxGJ49Qa9H8BMo,7
|
|
2
2
|
devcycle_python_sdk/__init__.py,sha256=30TcYb9PbvVi97gwk16omCGG1UoUI9lmmU7xpvxNMvc,336
|
|
3
3
|
devcycle_python_sdk/bucketing-lib.release.wasm,sha256=6iooyHRR-GBfrBH0_mleWyaNHr9uM_nVPS-IXGROGCY,224670
|
|
4
4
|
devcycle_python_sdk/cloud_client.py,sha256=dR2ye29Up699hO1cdrAWeoXIOBPVoSvQ4aKe2gSBRno,9414
|
|
@@ -30,11 +30,11 @@ devcycle_python_sdk/models/event.py,sha256=Sj3eEopuPp8QwQl_Oz8E6Y9Ph6nLG0HxU7eR7
|
|
|
30
30
|
devcycle_python_sdk/models/feature.py,sha256=m3wxxIjC5jxhKpPLI4RcsBaNLuy-zsMqoAgc8ySPe0I,852
|
|
31
31
|
devcycle_python_sdk/models/platform_data.py,sha256=nyQsgI6pcTd1FL3Y2ACmpvTYb08R_UtWul25OWZstps,849
|
|
32
32
|
devcycle_python_sdk/models/project_metadata.py,sha256=zRoE_oy_N3isqfrA5hAZ7S-7i5QBTSu9OGigFAvTqi8,602
|
|
33
|
-
devcycle_python_sdk/models/user.py,sha256=
|
|
33
|
+
devcycle_python_sdk/models/user.py,sha256=DgSP4iq9IxEOOBmYIKuCLXi6lVqYkt01_Wm0Z4-QWBo,7055
|
|
34
34
|
devcycle_python_sdk/models/variable.py,sha256=NXubhYWXYRAUEh4kDe2Tu9T5QnZmQ3roYVPbP-u2H3s,3030
|
|
35
35
|
devcycle_python_sdk/models/variable_metadata.py,sha256=oeH5fxDFLgAyc_B1RuOYRp4w68lTaBxTPvNgnXz7alE,583
|
|
36
36
|
devcycle_python_sdk/open_feature_provider/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
|
-
devcycle_python_sdk/open_feature_provider/provider.py,sha256=
|
|
37
|
+
devcycle_python_sdk/open_feature_provider/provider.py,sha256=Iby2X2YuYgR6-W00NOWE4K7YdSUHODeqjm4Eog7pACc,5693
|
|
38
38
|
devcycle_python_sdk/protobuf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
39
|
devcycle_python_sdk/protobuf/utils.py,sha256=SwsXH5QGAfbSn1FvgwO3x4W8uTYLsL1r3E-P5nDD4Nw,5528
|
|
40
40
|
devcycle_python_sdk/protobuf/variableForUserParams_pb2.py,sha256=SIFCo4AbjtlWQh2DYxkrWCR85PQajA4PIofXoRe4Gds,4956
|
|
@@ -42,11 +42,11 @@ devcycle_python_sdk/protobuf/variableForUserParams_pb2.pyi,sha256=OU4ORhjnbXy0Aq
|
|
|
42
42
|
devcycle_python_sdk/util/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
43
43
|
devcycle_python_sdk/util/strings.py,sha256=gH0Xm3gIXNqn6hczKPk10Jn5_9knuD7OB5MrB7bqztw,252
|
|
44
44
|
devcycle_python_sdk/util/version.py,sha256=Cz7Us_EuXP-T8GI47g2WHYdBJj_zKo-5y545IDHJAjI,253
|
|
45
|
-
devcycle_python_server_sdk-3.13.
|
|
45
|
+
devcycle_python_server_sdk-3.13.1.dist-info/licenses/LICENSE,sha256=RlvZsEX5o__wLAA-VE7mG5hzTPjnFzPJKNdXXKvZ854,1071
|
|
46
46
|
example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
47
|
example/cloud_client_example.py,sha256=YD8ZsTv3dPYfbFUKraRpRT0VsJGrPwjm8ZCuA5H54yI,2463
|
|
48
48
|
example/local_bucketing_client_example.py,sha256=TaIfy3VnW9fXii9NPYs5UOuP4fLKruXMjnZApveqzl4,2796
|
|
49
|
-
example/openfeature_example.py,sha256=
|
|
49
|
+
example/openfeature_example.py,sha256=8rdEtG_RiEbCwbQQWcCXtfZURz2Z393WoczyperkNug,8105
|
|
50
50
|
test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
51
51
|
test/test_cloud_client.py,sha256=CoK4xfHPMGyJ4hXrdI98e5f4zEL51vx31u_xmC3FEtc,15957
|
|
52
52
|
test/test_local_client.py,sha256=yg19ddGmg9t1TfjT-4EgHp0cjfxHjfJZOGIFM8mSNX8,18078
|
|
@@ -70,7 +70,7 @@ test/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
70
70
|
test/util/test_strings.py,sha256=T5H5U0af7_ld1yJC8IdDmay_Mx-iJQ5Fi5fbvKcAc7A,862
|
|
71
71
|
test/util/test_utils.py,sha256=tVBJm_qnqg-4PssLpXIxqlk0JehuiAIPs4zpi2oNVnY,6671
|
|
72
72
|
test/util/test_version.py,sha256=3Xg0_84m0bdHXz6pxd2Z85Oz9DoUC1T0Ol_WqEH_jac,335
|
|
73
|
-
devcycle_python_server_sdk-3.13.
|
|
74
|
-
devcycle_python_server_sdk-3.13.
|
|
75
|
-
devcycle_python_server_sdk-3.13.
|
|
76
|
-
devcycle_python_server_sdk-3.13.
|
|
73
|
+
devcycle_python_server_sdk-3.13.1.dist-info/METADATA,sha256=1mU8MQraVdQxnwAxNqGvxsQ6GmpBxsVOEk9O_MpAwqA,723
|
|
74
|
+
devcycle_python_server_sdk-3.13.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
75
|
+
devcycle_python_server_sdk-3.13.1.dist-info/top_level.txt,sha256=34f8zDzihAHoH7siAFlmscyO_QLNWWq9HApFlwtYL4k,33
|
|
76
|
+
devcycle_python_server_sdk-3.13.1.dist-info/RECORD,,
|
example/openfeature_example.py
CHANGED
|
@@ -7,19 +7,32 @@ from devcycle_python_sdk import DevCycleLocalClient, DevCycleLocalOptions
|
|
|
7
7
|
from openfeature import api
|
|
8
8
|
from openfeature.evaluation_context import EvaluationContext
|
|
9
9
|
|
|
10
|
-
FLAG_KEY = "test-boolean-variable"
|
|
11
|
-
|
|
12
10
|
logger = logging.getLogger(__name__)
|
|
13
11
|
|
|
14
12
|
|
|
15
13
|
def main():
|
|
16
14
|
"""
|
|
17
15
|
Sample usage of the DevCycle OpenFeature Provider along with the Python Server SDK using Local Bucketing.
|
|
16
|
+
|
|
17
|
+
This example demonstrates how to use all variable types supported by DevCycle through OpenFeature:
|
|
18
|
+
- Boolean variables
|
|
19
|
+
- String variables
|
|
20
|
+
- Number variables (integer and float)
|
|
21
|
+
- JSON object variables
|
|
22
|
+
|
|
23
|
+
See DEVCYCLE_SETUP.md for instructions on creating the required variables in DevCycle.
|
|
18
24
|
"""
|
|
19
25
|
logging.basicConfig(level="INFO", format="%(levelname)s: %(message)s")
|
|
20
26
|
|
|
21
27
|
# create an instance of the DevCycle Client object
|
|
22
|
-
server_sdk_key = os.environ
|
|
28
|
+
server_sdk_key = os.environ.get("DEVCYCLE_SERVER_SDK_KEY")
|
|
29
|
+
if not server_sdk_key:
|
|
30
|
+
logger.error("DEVCYCLE_SERVER_SDK_KEY environment variable is not set")
|
|
31
|
+
logger.error(
|
|
32
|
+
"Please set it with: export DEVCYCLE_SERVER_SDK_KEY='your-sdk-key'"
|
|
33
|
+
)
|
|
34
|
+
exit(1)
|
|
35
|
+
|
|
23
36
|
devcycle_client = DevCycleLocalClient(server_sdk_key, DevCycleLocalOptions())
|
|
24
37
|
|
|
25
38
|
# Wait for DevCycle to initialize and load the configuration
|
|
@@ -32,6 +45,8 @@ def main():
|
|
|
32
45
|
logger.error("DevCycle failed to initialize")
|
|
33
46
|
exit(1)
|
|
34
47
|
|
|
48
|
+
logger.info("DevCycle initialized successfully!\n")
|
|
49
|
+
|
|
35
50
|
# set the provider for OpenFeature
|
|
36
51
|
api.set_provider(devcycle_client.get_openfeature_provider())
|
|
37
52
|
|
|
@@ -53,22 +68,168 @@ def main():
|
|
|
53
68
|
},
|
|
54
69
|
)
|
|
55
70
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
71
|
+
logger.info("=" * 60)
|
|
72
|
+
logger.info("Testing Boolean Variable")
|
|
73
|
+
logger.info("=" * 60)
|
|
74
|
+
|
|
75
|
+
# Test Boolean Variable
|
|
76
|
+
boolean_details = open_feature_client.get_boolean_details(
|
|
77
|
+
"test-boolean-variable", False, context
|
|
78
|
+
)
|
|
79
|
+
logger.info("Variable Key: test-boolean-variable")
|
|
80
|
+
logger.info("Value: {boolean_details.value}")
|
|
81
|
+
logger.info("Reason: {boolean_details.reason}")
|
|
82
|
+
if boolean_details.value:
|
|
83
|
+
logger.info("✓ Boolean variable is ENABLED")
|
|
59
84
|
else:
|
|
60
|
-
logger.info(
|
|
85
|
+
logger.info("✗ Boolean variable is DISABLED")
|
|
86
|
+
|
|
87
|
+
logger.info("\n" + "=" * 60)
|
|
88
|
+
logger.info("Testing String Variable")
|
|
89
|
+
logger.info("=" * 60)
|
|
61
90
|
|
|
62
|
-
#
|
|
63
|
-
|
|
91
|
+
# Test String Variable
|
|
92
|
+
open_feature_client.get_string_details(
|
|
93
|
+
"test-string-variable", "default string", context
|
|
94
|
+
)
|
|
95
|
+
logger.info("Variable Key: test-string-variable")
|
|
96
|
+
logger.info("Value: {string_details.value}")
|
|
97
|
+
logger.info("Reason: {string_details.reason}")
|
|
98
|
+
|
|
99
|
+
logger.info("\n" + "=" * 60)
|
|
100
|
+
logger.info("Testing Number Variable (Integer)")
|
|
101
|
+
logger.info("=" * 60)
|
|
102
|
+
|
|
103
|
+
# Test Number Variable (Integer)
|
|
104
|
+
open_feature_client.get_integer_details("test-number-variable", 0, context)
|
|
105
|
+
logger.info("Variable Key: test-number-variable")
|
|
106
|
+
logger.info("Value: {integer_details.value}")
|
|
107
|
+
logger.info("Reason: {integer_details.reason}")
|
|
108
|
+
|
|
109
|
+
logger.info("\n" + "=" * 60)
|
|
110
|
+
logger.info("Testing Number Variable (Float)")
|
|
111
|
+
logger.info("=" * 60)
|
|
112
|
+
|
|
113
|
+
# Test Number Variable as Float
|
|
114
|
+
# Note: If the DevCycle variable is an integer, it will be cast to float
|
|
115
|
+
open_feature_client.get_float_value("test-number-variable", 0.0, context)
|
|
116
|
+
logger.info("Variable Key: test-number-variable (as float)")
|
|
117
|
+
logger.info("Value: {float_value}")
|
|
118
|
+
|
|
119
|
+
logger.info("\n" + "=" * 60)
|
|
120
|
+
logger.info("Testing JSON Object Variable")
|
|
121
|
+
logger.info("=" * 60)
|
|
122
|
+
|
|
123
|
+
# Test JSON Object Variable
|
|
124
|
+
open_feature_client.get_object_details(
|
|
64
125
|
"test-json-variable", {"default": "value"}, context
|
|
65
126
|
)
|
|
66
|
-
logger.info(
|
|
127
|
+
logger.info("Variable Key: test-json-variable")
|
|
128
|
+
logger.info("Value: {json_details.value}")
|
|
129
|
+
logger.info("Reason: {json_details.reason}")
|
|
130
|
+
|
|
131
|
+
logger.info("\n" + "=" * 60)
|
|
132
|
+
logger.info("Testing Object Variable - Empty Dictionary")
|
|
133
|
+
logger.info("=" * 60)
|
|
134
|
+
|
|
135
|
+
# Test with empty dictionary default (valid per OpenFeature spec)
|
|
136
|
+
open_feature_client.get_object_value("test-json-variable", {}, context)
|
|
137
|
+
logger.info("Variable Key: test-json-variable (with empty default)")
|
|
138
|
+
logger.info("Value: {empty_dict_result}")
|
|
139
|
+
|
|
140
|
+
logger.info("\n" + "=" * 60)
|
|
141
|
+
logger.info("Testing Object Variable - Mixed Types")
|
|
142
|
+
logger.info("=" * 60)
|
|
143
|
+
|
|
144
|
+
# Test with flat dictionary containing mixed primitive types
|
|
145
|
+
# OpenFeature allows string, int, float, bool, and None in flat dictionaries
|
|
146
|
+
mixed_default = {
|
|
147
|
+
"string_key": "hello",
|
|
148
|
+
"int_key": 42,
|
|
149
|
+
"float_key": 3.14,
|
|
150
|
+
"bool_key": True,
|
|
151
|
+
"none_key": None,
|
|
152
|
+
}
|
|
153
|
+
mixed_result = open_feature_client.get_object_value(
|
|
154
|
+
"test-json-variable", mixed_default, context
|
|
155
|
+
)
|
|
156
|
+
logger.info("Variable Key: test-json-variable (with mixed types)")
|
|
157
|
+
logger.info("Value: {mixed_result}")
|
|
158
|
+
logger.info(
|
|
159
|
+
f"Value types: {[(k, type(v).__name__) for k, v in mixed_result.items()]}"
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
logger.info("\n" + "=" * 60)
|
|
163
|
+
logger.info("Testing Object Variable - All String Values")
|
|
164
|
+
logger.info("=" * 60)
|
|
165
|
+
|
|
166
|
+
# Test with all string values
|
|
167
|
+
string_dict_default = {
|
|
168
|
+
"name": "John Doe",
|
|
169
|
+
"email": "john@example.com",
|
|
170
|
+
"status": "active",
|
|
171
|
+
}
|
|
172
|
+
open_feature_client.get_object_value(
|
|
173
|
+
"test-json-variable", string_dict_default, context
|
|
174
|
+
)
|
|
175
|
+
logger.info("Variable Key: test-json-variable (all strings)")
|
|
176
|
+
logger.info("Value: {string_dict_result}")
|
|
177
|
+
|
|
178
|
+
logger.info("\n" + "=" * 60)
|
|
179
|
+
logger.info("Testing Object Variable - Numeric Values")
|
|
180
|
+
logger.info("=" * 60)
|
|
181
|
+
|
|
182
|
+
# Test with numeric values (integers and floats)
|
|
183
|
+
numeric_dict_default = {"count": 100, "percentage": 85.5, "threshold": 0}
|
|
184
|
+
open_feature_client.get_object_value(
|
|
185
|
+
"test-json-variable", numeric_dict_default, context
|
|
186
|
+
)
|
|
187
|
+
logger.info("Variable Key: test-json-variable (numeric)")
|
|
188
|
+
logger.info("Value: {numeric_dict_result}")
|
|
189
|
+
|
|
190
|
+
logger.info("\n" + "=" * 60)
|
|
191
|
+
logger.info("Testing Object Variable - Boolean Flags")
|
|
192
|
+
logger.info("=" * 60)
|
|
193
|
+
|
|
194
|
+
# Test with boolean values
|
|
195
|
+
bool_dict_default = {"feature_a": True, "feature_b": False, "feature_c": True}
|
|
196
|
+
open_feature_client.get_object_value(
|
|
197
|
+
"test-json-variable", bool_dict_default, context
|
|
198
|
+
)
|
|
199
|
+
logger.info("Variable Key: test-json-variable (booleans)")
|
|
200
|
+
logger.info("Value: {bool_dict_result}")
|
|
201
|
+
|
|
202
|
+
logger.info("\n" + "=" * 60)
|
|
203
|
+
logger.info("Testing Object Variable - With None Values")
|
|
204
|
+
logger.info("=" * 60)
|
|
205
|
+
|
|
206
|
+
# Test with None values (valid per OpenFeature spec for flat dictionaries)
|
|
207
|
+
none_dict_default = {
|
|
208
|
+
"optional_field": None,
|
|
209
|
+
"required_field": "value",
|
|
210
|
+
"nullable_count": None,
|
|
211
|
+
}
|
|
212
|
+
open_feature_client.get_object_value(
|
|
213
|
+
"test-json-variable", none_dict_default, context
|
|
214
|
+
)
|
|
215
|
+
logger.info("Variable Key: test-json-variable (with None)")
|
|
216
|
+
logger.info("Value: {none_dict_result}")
|
|
217
|
+
|
|
218
|
+
logger.info("\n" + "=" * 60)
|
|
219
|
+
logger.info("Testing Non-Existent Variable (Should Return Default)")
|
|
220
|
+
logger.info("=" * 60)
|
|
221
|
+
|
|
222
|
+
# Test non-existent variable to demonstrate default handling
|
|
223
|
+
open_feature_client.get_string_details(
|
|
224
|
+
"doesnt-exist", "default fallback value", context
|
|
225
|
+
)
|
|
226
|
+
logger.info("Variable Key: doesnt-exist")
|
|
227
|
+
logger.info("Value: {nonexistent_details.value}")
|
|
228
|
+
logger.info("Reason: {nonexistent_details.reason}")
|
|
67
229
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
logger.info(
|
|
71
|
-
logger.info(f"Eval Reason: {details.reason}")
|
|
230
|
+
logger.info("\n" + "=" * 60)
|
|
231
|
+
logger.info("All tests completed!")
|
|
232
|
+
logger.info("=" * 60)
|
|
72
233
|
|
|
73
234
|
devcycle_client.close()
|
|
74
235
|
|
{devcycle_python_server_sdk-3.13.0.dist-info → devcycle_python_server_sdk-3.13.1.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|