posthoganalytics 6.4.0__py3-none-any.whl → 6.4.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.
@@ -1644,6 +1644,7 @@ class Client(object):
1644
1644
  try:
1645
1645
  return remote_config(
1646
1646
  self.personal_api_key,
1647
+ self.api_key,
1647
1648
  self.host,
1648
1649
  key,
1649
1650
  timeout=self.feature_flags_request_timeout_seconds,
@@ -132,12 +132,16 @@ def flags(
132
132
 
133
133
 
134
134
  def remote_config(
135
- personal_api_key: str, host: Optional[str] = None, key: str = "", timeout: int = 15
135
+ personal_api_key: str,
136
+ project_api_key: str,
137
+ host: Optional[str] = None,
138
+ key: str = "",
139
+ timeout: int = 15,
136
140
  ) -> Any:
137
141
  """Get remote config flag value from remote_config API endpoint"""
138
142
  return get(
139
143
  personal_api_key,
140
- f"/api/projects/@current/feature_flags/{key}/remote_config/",
144
+ f"/api/projects/@current/feature_flags/{key}/remote_config?token={project_api_key}",
141
145
  host,
142
146
  timeout,
143
147
  )
@@ -2,13 +2,13 @@ import time
2
2
  import unittest
3
3
  from datetime import datetime
4
4
  from uuid import uuid4
5
- from posthoganalytics.contexts import get_context_session_id, set_context_session, new_context
6
5
 
7
6
  import mock
8
7
  import six
9
8
  from parameterized import parameterized
10
9
 
11
10
  from posthoganalytics.client import Client
11
+ from posthoganalytics.contexts import get_context_session_id, new_context, set_context_session
12
12
  from posthoganalytics.request import APIError
13
13
  from posthoganalytics.test.test_utils import FAKE_TEST_API_KEY
14
14
  from posthoganalytics.types import FeatureFlag, LegacyFlagMetadata
@@ -2057,7 +2057,7 @@ class TestClient(unittest.TestCase):
2057
2057
 
2058
2058
  def test_set_context_session_override_in_capture(self):
2059
2059
  """Test that explicit session ID overrides context session ID in capture"""
2060
- from posthoganalytics.contexts import set_context_session, new_context
2060
+ from posthoganalytics.contexts import new_context, set_context_session
2061
2061
 
2062
2062
  with mock.patch("posthog.client.batch_post") as mock_post:
2063
2063
  client = Client(FAKE_TEST_API_KEY, on_error=self.set_fail, sync_mode=True)
@@ -2158,6 +2158,7 @@ class TestClient(unittest.TestCase):
2158
2158
  self.assertEqual(result, {"test": "payload"})
2159
2159
  patch_remote_config.assert_called_once_with(
2160
2160
  "test-personal-key",
2161
+ FAKE_TEST_API_KEY,
2161
2162
  client.host,
2162
2163
  "test-flag",
2163
2164
  timeout=client.feature_flags_request_timeout_seconds,
@@ -2282,9 +2283,7 @@ class TestClient(unittest.TestCase):
2282
2283
  }
2283
2284
  ]
2284
2285
  },
2285
- "payloads": {
2286
- "empty-variant": "" # Empty string payload
2287
- },
2286
+ "payloads": {"empty-variant": ""}, # Empty string payload
2288
2287
  },
2289
2288
  }
2290
2289
  ]
@@ -1,4 +1,4 @@
1
- VERSION = "6.4.0"
1
+ VERSION = "6.4.1"
2
2
 
3
3
  if __name__ == "__main__":
4
4
  print(VERSION, end="") # noqa: T201
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: posthoganalytics
3
- Version: 6.4.0
3
+ Version: 6.4.1
4
4
  Summary: Integrate PostHog into any python application.
5
5
  Home-page: https://github.com/posthog/posthog-python
6
6
  Author: Posthog
@@ -1,6 +1,6 @@
1
1
  posthoganalytics/__init__.py,sha256=66HkeJ1fkzbKC2ggl3F164oajFeiGm8v84kJR0Yf5BI,25987
2
2
  posthoganalytics/args.py,sha256=iZ2JWeANiAREJKhS-Qls9tIngjJOSfAVR8C4xFT5sHw,3307
3
- posthoganalytics/client.py,sha256=tbyYFWy7-ctXzQuKNUcXvp45aW2adlAA4mvGQii4tkA,68445
3
+ posthoganalytics/client.py,sha256=rc597SBF8f6IGHRxFeYGiWJdsdVyTMfrLbZoFfH7npc,68475
4
4
  posthoganalytics/consumer.py,sha256=CiNbJBdyW9jER3ZYCKbX-JFmEDXlE1lbDy1MSl43-a0,4617
5
5
  posthoganalytics/contexts.py,sha256=LFSFIYpUFWKTBnGMjV9n1aYHWbAzz5zLJGr2qG34PoE,9405
6
6
  posthoganalytics/exception_capture.py,sha256=1VHBfffrXXrkK0PT8iVgKPpj_R1pGAzG5f3Qw0WF79w,1783
@@ -8,10 +8,10 @@ posthoganalytics/exception_utils.py,sha256=P_75873Y2jayqlLiIkbxCNE7Bc8cM6J9kfrdZ
8
8
  posthoganalytics/feature_flags.py,sha256=O_kXmw3goB2E9XMBosdPeBAuo9MsnsH8PyNWq95a0qo,14391
9
9
  posthoganalytics/poller.py,sha256=jBz5rfH_kn_bBz7wCB46Fpvso4ttx4uzqIZWvXBCFmQ,595
10
10
  posthoganalytics/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- posthoganalytics/request.py,sha256=TaeySYpcvHMf5Ftf5KqqlO0VPJpirKBCRrThlS04Kew,6124
11
+ posthoganalytics/request.py,sha256=Bsl2c5WwONKPQzwWMmKPX5VgOlwSiIcSNfhXgoz62Y8,6186
12
12
  posthoganalytics/types.py,sha256=k_IE_tvAE7wBKHthTSPEf4zB-SPuK2y3LDlsGXuU5_8,10093
13
13
  posthoganalytics/utils.py,sha256=-0w-OLcCaoldkbBebPzQyBzLJSo9G9yBOg8NDVz7La8,16088
14
- posthoganalytics/version.py,sha256=_QYpIUP8_ZBpes49HYpa84OWbCpcqhVfuDSlCop1GDI,87
14
+ posthoganalytics/version.py,sha256=dISqDvruWsjY823APO70NatX2drWKCjyTx4rP850KmM,87
15
15
  posthoganalytics/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  posthoganalytics/ai/utils.py,sha256=92RlL395wjL5V9FstS8BeebwMtaz6DP6zS9miCNla9M,21106
17
17
  posthoganalytics/ai/anthropic/__init__.py,sha256=fFhDOiRzTXzGQlgnrRDL-4yKC8EYIl8NW4a2QNR6xRU,368
@@ -30,7 +30,7 @@ posthoganalytics/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
30
30
  posthoganalytics/integrations/django.py,sha256=KYtBr7CkiZQynRc2TCWWYHe-J3ie8iSUa42WPshYZdc,6795
31
31
  posthoganalytics/test/__init__.py,sha256=VYgM6xPbJbvS-xhIcDiBRs0MFC9V_jT65uNeerCz_rM,299
32
32
  posthoganalytics/test/test_before_send.py,sha256=A1_UVMewhHAvO39rZDWfS606vG_X-q0KNXvh5DAKiB8,7930
33
- posthoganalytics/test/test_client.py,sha256=x66Qly5QQySl9OcUlqviuWuOnWCgf5oLT1Jh6nm8I1E,91598
33
+ posthoganalytics/test/test_client.py,sha256=_m3C_dIwLViL8mjI12oxw--s9XUM97hAbTFP_Y7atr4,91583
34
34
  posthoganalytics/test/test_consumer.py,sha256=HGMfU9PzQ5ZAe_R3kHnZNsMvD7jUjHL-gie0isrvMMk,7107
35
35
  posthoganalytics/test/test_contexts.py,sha256=c--hNUIEf6SHQ7H9vdPhU1oLCN0SnD4wDbFr-eLPHDo,7013
36
36
  posthoganalytics/test/test_exception_capture.py,sha256=al37Kg6wjzL_IBCFUUXRvkP6nVrqS6IZRCOKSo29Nh8,1063
@@ -42,8 +42,8 @@ posthoganalytics/test/test_request.py,sha256=Zc0VbkjpVmj8mKokQm9rzdgTr0b1U44vvMY
42
42
  posthoganalytics/test/test_size_limited_dict.py,sha256=-5IQjIEr_-Dql24M0HusdR_XroOMrtgiT0v6ZQCRvzo,774
43
43
  posthoganalytics/test/test_types.py,sha256=bRPHdwVpP7hu7emsplU8UVyzSQptv6PaG5lAoOD_BtM,7595
44
44
  posthoganalytics/test/test_utils.py,sha256=sqUTbfweVcxxFRd3WDMFXqPMyU6DvzOBeAOc68Py9aw,9620
45
- posthoganalytics-6.4.0.dist-info/licenses/LICENSE,sha256=wGf9JBotDkSygFj43m49oiKlFnpMnn97keiZKF-40vE,2450
46
- posthoganalytics-6.4.0.dist-info/METADATA,sha256=ZPFelafm_P6LVTRr2cOr8-PshTky1OqercoroTgqC0s,6024
47
- posthoganalytics-6.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
- posthoganalytics-6.4.0.dist-info/top_level.txt,sha256=8QsNIqIkBh1p2TXvKp0Em9ZLZKwe3uIqCETyW4s1GOE,17
49
- posthoganalytics-6.4.0.dist-info/RECORD,,
45
+ posthoganalytics-6.4.1.dist-info/licenses/LICENSE,sha256=wGf9JBotDkSygFj43m49oiKlFnpMnn97keiZKF-40vE,2450
46
+ posthoganalytics-6.4.1.dist-info/METADATA,sha256=vnWK_f5N0jrfWqttdunrmMCv2bjBs1YNh7e7XD2rdiQ,6024
47
+ posthoganalytics-6.4.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
+ posthoganalytics-6.4.1.dist-info/top_level.txt,sha256=8QsNIqIkBh1p2TXvKp0Em9ZLZKwe3uIqCETyW4s1GOE,17
49
+ posthoganalytics-6.4.1.dist-info/RECORD,,