You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+65-2Lines changed: 65 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,75 @@
1
+
## 4.2.0 - 2025-05-22
2
+
3
+
Add support for google gemini
4
+
5
+
## 4.1.0 - 2025-05-22
6
+
7
+
Moved ai openai package to a composition approach over inheritance.
8
+
9
+
## 4.0.1 – 2025-04-29
10
+
11
+
1. Remove deprecated `monotonic` library. Use Python's core `time.monotonic` function instead
12
+
2. Clarify Python 3.9+ is required
13
+
14
+
## 4.0.0 - 2025-04-24
15
+
16
+
1. Added new method `get_feature_flag_result` which returns a `FeatureFlagResult` object. This object breaks down the result of a feature flag into its enabled state, variant, and payload. The benefit of this method is it allows you to retrieve the result of a feature flag and its payload in a single API call. You can call `get_value` on the result to get the value of the feature flag, which is the same value returned by `get_feature_flag` (aka the string `variant` if the flag is a multivariate flag or the `boolean` value if the flag is a boolean flag).
17
+
18
+
Example:
19
+
20
+
```python
21
+
result = posthog.get_feature_flag_result("my-flag", "distinct_id")
22
+
print(result.enabled) # True or False
23
+
print(result.variant) # 'the-variant-value' or None
24
+
print(result.payload) # {'foo': 'bar'}
25
+
print(result.get_value()) # 'the-variant-value' or True or False
26
+
print(result.reason) # 'matched condition set 2' (Not available for local evaluation)
27
+
```
28
+
29
+
Breaking change:
30
+
31
+
1.`get_feature_flag_payload` now deserializes payloads from JSON strings to `Any`. Previously, it returned the payload as a JSON encoded string.
0 commit comments