posthog 7.8.1__py3-none-any.whl → 7.8.2__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.
posthog/ai/prompts.py CHANGED
@@ -15,7 +15,7 @@ from posthog.utils import remove_trailing_slash
15
15
 
16
16
  log = logging.getLogger("posthog")
17
17
 
18
- APP_ENDPOINT = "https://app.posthog.com"
18
+ APP_ENDPOINT = "https://us.posthog.com"
19
19
  DEFAULT_CACHE_TTL_SECONDS = 300 # 5 minutes
20
20
 
21
21
  PromptVariables = Dict[str, Union[str, int, float, bool]]
@@ -50,11 +50,11 @@ class Prompts:
50
50
  from posthog.ai.prompts import Prompts
51
51
 
52
52
  # With PostHog client
53
- posthog = Posthog('phc_xxx', host='https://app.posthog.com', personal_api_key='phx_xxx')
53
+ posthog = Posthog('phc_xxx', host='https://us.posthog.com', personal_api_key='phx_xxx')
54
54
  prompts = Prompts(posthog)
55
55
 
56
56
  # Or with direct options (no PostHog client needed)
57
- prompts = Prompts(personal_api_key='phx_xxx', host='https://app.posthog.com')
57
+ prompts = Prompts(personal_api_key='phx_xxx', host='https://us.posthog.com')
58
58
 
59
59
  # Fetch with caching and fallback
60
60
  template = prompts.get('support-system-prompt', fallback='You are a helpful assistant.')
@@ -33,7 +33,7 @@ class TestPrompts(unittest.TestCase):
33
33
  }
34
34
 
35
35
  def create_mock_posthog(
36
- self, personal_api_key="phx_test_key", host="https://app.posthog.com"
36
+ self, personal_api_key="phx_test_key", host="https://us.posthog.com"
37
37
  ):
38
38
  """Create a mock PostHog client."""
39
39
  mock = MagicMock()
@@ -61,7 +61,7 @@ class TestPromptsGet(TestPrompts):
61
61
  call_args = mock_get.call_args
62
62
  self.assertEqual(
63
63
  call_args[0][0],
64
- "https://app.posthog.com/api/environments/@current/llm_prompts/name/test-prompt/",
64
+ "https://us.posthog.com/api/environments/@current/llm_prompts/name/test-prompt/",
65
65
  )
66
66
  self.assertIn("Authorization", call_args[1]["headers"])
67
67
  self.assertEqual(
@@ -333,7 +333,7 @@ class TestPromptsGet(TestPrompts):
333
333
  call_args = mock_get.call_args
334
334
  self.assertEqual(
335
335
  call_args[0][0],
336
- "https://app.posthog.com/api/environments/@current/llm_prompts/name/prompt%20with%20spaces%2Fand%2Fslashes/",
336
+ "https://us.posthog.com/api/environments/@current/llm_prompts/name/prompt%20with%20spaces%2Fand%2Fslashes/",
337
337
  )
338
338
 
339
339
  @patch("posthog.ai.prompts._get_session")
@@ -350,7 +350,7 @@ class TestPromptsGet(TestPrompts):
350
350
  call_args = mock_get.call_args
351
351
  self.assertEqual(
352
352
  call_args[0][0],
353
- "https://app.posthog.com/api/environments/@current/llm_prompts/name/test-prompt/",
353
+ "https://us.posthog.com/api/environments/@current/llm_prompts/name/test-prompt/",
354
354
  )
355
355
  self.assertEqual(
356
356
  call_args[1]["headers"]["Authorization"], "Bearer phx_direct_key"
posthog/version.py CHANGED
@@ -1,4 +1,4 @@
1
- VERSION = "7.8.1"
1
+ VERSION = "7.8.2"
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: posthog
3
- Version: 7.8.1
3
+ Version: 7.8.2
4
4
  Summary: Integrate PostHog into any python application.
5
5
  Home-page: https://github.com/posthog/posthog-python
6
6
  Author: Posthog
@@ -12,9 +12,9 @@ posthog/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  posthog/request.py,sha256=_WdffuI4BgRL9UvbEEi-4uxpFW3P4h7PRDpYM0lawVU,11817
13
13
  posthog/types.py,sha256=OxGHSmmhVYwA7ecmJXUznDCZ1c4gAGtERzSLSYlyQFM,11540
14
14
  posthog/utils.py,sha256=-0w-OLcCaoldkbBebPzQyBzLJSo9G9yBOg8NDVz7La8,16088
15
- posthog/version.py,sha256=sl041ey3-9y2JhJLC6u2e9H2z1sJUwKy_cOh50bQlg0,87
15
+ posthog/version.py,sha256=VTcfPWbP5D4iI0vLP05VDW58OcsgbbFSpvyu8z-LZq0,87
16
16
  posthog/ai/__init__.py,sha256=BelRWi61Lir0aISS-dbjWGlRdzyWkZhF0WjHt0ynKEg,62
17
- posthog/ai/prompts.py,sha256=0qHvXXfyGDxGpoQiGEbB0jQNWOP2Fk5fW9fjufcvUNY,8426
17
+ posthog/ai/prompts.py,sha256=kPQMrC_iytpcaFdJ3MerV_y1c2y0Jq9Y7fzYJZ7hBG8,8423
18
18
  posthog/ai/sanitization.py,sha256=Dpx_5gKZfDS38KjmK1C0lvvjm9N8Pp_oIxusac888-g,6057
19
19
  posthog/ai/types.py,sha256=65sj_ZFUx75FiLM4ESdRPyZhrT6rO_gqJ2-zfcUot40,3356
20
20
  posthog/ai/utils.py,sha256=ryEWvbIK3lhBgT1UOnFQ4Vme74Wu2szazZl1EA_mX20,25847
@@ -54,13 +54,13 @@ posthog/test/test_size_limited_dict.py,sha256=Wom7BkzpHmusHilZy0SV3PNzhw7ucuQgqr
54
54
  posthog/test/test_types.py,sha256=csLuBiz6RMV36cpg9LVIor4Khq6MfjjGxYXodx5VttY,7586
55
55
  posthog/test/test_utils.py,sha256=YqAnXaMHxzEV_D3AHhs-RXnZYzdEN7kdIlpOT6Ti6t0,9714
56
56
  posthog/test/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
57
- posthog/test/ai/test_prompts.py,sha256=71p0liiOs-YFHP4oVnuw8HgQcEsQjfgUlKc_H5YTows,21047
57
+ posthog/test/ai/test_prompts.py,sha256=E4wp71DaDX1BCtppICQWJtr1Cd_zxIfH25O7myoEeA8,21043
58
58
  posthog/test/ai/test_sanitization.py,sha256=o1hfURXb73b60OtOJ0mQDhvGBYcX25I2FSNF-MnNjGg,18146
59
59
  posthog/test/ai/test_system_prompts.py,sha256=Y_-zlUvwIaS6O2F8mv2OZQfO-BdM5N3w3EyH3Y-P7x0,14290
60
60
  posthog/test/ai/openai_agents/__init__.py,sha256=VGLVcRkGkmj0d4MhjcwQ5IYxoaaMPlw0oR7eXSCcGXI,42
61
61
  posthog/test/ai/openai_agents/test_processor.py,sha256=Z_1NhKU--p31nbvLzHj99jnlF0r0wOMNsXEjSimBI4c,30791
62
- posthog-7.8.1.dist-info/licenses/LICENSE,sha256=wGf9JBotDkSygFj43m49oiKlFnpMnn97keiZKF-40vE,2450
63
- posthog-7.8.1.dist-info/METADATA,sha256=DTm5V4nnwHxEqPsLZuw2EygzjKtg-GxoIxUsK07qE8w,6359
64
- posthog-7.8.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
65
- posthog-7.8.1.dist-info/top_level.txt,sha256=7FBLsRjIUHVKQsXIhozuI3k-mun1tapp8iZO9EmUPEw,8
66
- posthog-7.8.1.dist-info/RECORD,,
62
+ posthog-7.8.2.dist-info/licenses/LICENSE,sha256=wGf9JBotDkSygFj43m49oiKlFnpMnn97keiZKF-40vE,2450
63
+ posthog-7.8.2.dist-info/METADATA,sha256=Ej3UVHTl-MYXs-rYlbkvA6-LXk88ZpPPlLooSRB54ZQ,6359
64
+ posthog-7.8.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
65
+ posthog-7.8.2.dist-info/top_level.txt,sha256=7FBLsRjIUHVKQsXIhozuI3k-mun1tapp8iZO9EmUPEw,8
66
+ posthog-7.8.2.dist-info/RECORD,,