posthog 5.4.0__tar.gz → 6.8.0__tar.gz

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.
Files changed (74) hide show
  1. {posthog-5.4.0/posthog.egg-info → posthog-6.8.0}/PKG-INFO +6 -3
  2. {posthog-5.4.0 → posthog-6.8.0}/README.md +4 -2
  3. posthog-6.8.0/posthog/__init__.py +765 -0
  4. {posthog-5.4.0 → posthog-6.8.0}/posthog/ai/anthropic/__init__.py +10 -0
  5. {posthog-5.4.0 → posthog-6.8.0}/posthog/ai/anthropic/anthropic.py +98 -67
  6. {posthog-5.4.0 → posthog-6.8.0}/posthog/ai/anthropic/anthropic_async.py +98 -67
  7. posthog-6.8.0/posthog/ai/anthropic/anthropic_converter.py +443 -0
  8. {posthog-5.4.0 → posthog-6.8.0}/posthog/ai/anthropic/anthropic_providers.py +11 -8
  9. posthog-6.8.0/posthog/ai/gemini/__init__.py +22 -0
  10. {posthog-5.4.0 → posthog-6.8.0}/posthog/ai/gemini/gemini.py +139 -85
  11. posthog-6.8.0/posthog/ai/gemini/gemini_converter.py +586 -0
  12. {posthog-5.4.0 → posthog-6.8.0}/posthog/ai/langchain/callbacks.py +66 -25
  13. posthog-6.8.0/posthog/ai/openai/__init__.py +20 -0
  14. {posthog-5.4.0 → posthog-6.8.0}/posthog/ai/openai/openai.py +125 -186
  15. {posthog-5.4.0 → posthog-6.8.0}/posthog/ai/openai/openai_async.py +113 -119
  16. posthog-6.8.0/posthog/ai/openai/openai_converter.py +735 -0
  17. {posthog-5.4.0 → posthog-6.8.0}/posthog/ai/openai/openai_providers.py +7 -4
  18. posthog-6.8.0/posthog/ai/sanitization.py +226 -0
  19. posthog-6.8.0/posthog/ai/types.py +125 -0
  20. posthog-6.8.0/posthog/ai/utils.py +589 -0
  21. posthog-6.8.0/posthog/args.py +71 -0
  22. posthog-6.8.0/posthog/client.py +2066 -0
  23. posthog-5.4.0/posthog/scopes.py → posthog-6.8.0/posthog/contexts.py +59 -20
  24. {posthog-5.4.0 → posthog-6.8.0}/posthog/exception_capture.py +3 -25
  25. {posthog-5.4.0 → posthog-6.8.0}/posthog/exception_utils.py +85 -168
  26. {posthog-5.4.0 → posthog-6.8.0}/posthog/feature_flags.py +260 -19
  27. posthog-6.8.0/posthog/integrations/django.py +319 -0
  28. {posthog-5.4.0 → posthog-6.8.0}/posthog/request.py +6 -2
  29. posthog-6.8.0/posthog/test/test_before_send.py +218 -0
  30. posthog-6.8.0/posthog/test/test_client.py +2468 -0
  31. posthog-5.4.0/posthog/test/test_scopes.py → posthog-6.8.0/posthog/test/test_contexts.py +2 -15
  32. posthog-6.8.0/posthog/test/test_exception_capture.py +34 -0
  33. {posthog-5.4.0 → posthog-6.8.0}/posthog/test/test_feature_flag_result.py +12 -12
  34. {posthog-5.4.0 → posthog-6.8.0}/posthog/test/test_feature_flags.py +1286 -66
  35. posthog-6.8.0/posthog/test/test_module.py +32 -0
  36. {posthog-5.4.0 → posthog-6.8.0}/posthog/test/test_utils.py +123 -0
  37. {posthog-5.4.0 → posthog-6.8.0}/posthog/types.py +29 -3
  38. posthog-6.8.0/posthog/utils.py +519 -0
  39. {posthog-5.4.0 → posthog-6.8.0}/posthog/version.py +1 -1
  40. {posthog-5.4.0 → posthog-6.8.0/posthog.egg-info}/PKG-INFO +6 -3
  41. {posthog-5.4.0 → posthog-6.8.0}/posthog.egg-info/SOURCES.txt +8 -4
  42. {posthog-5.4.0 → posthog-6.8.0}/posthog.egg-info/requires.txt +1 -0
  43. {posthog-5.4.0 → posthog-6.8.0}/pyproject.toml +3 -1
  44. posthog-5.4.0/posthog/__init__.py +0 -633
  45. posthog-5.4.0/posthog/ai/gemini/__init__.py +0 -11
  46. posthog-5.4.0/posthog/ai/openai/__init__.py +0 -5
  47. posthog-5.4.0/posthog/ai/utils.py +0 -544
  48. posthog-5.4.0/posthog/client.py +0 -1481
  49. posthog-5.4.0/posthog/exception_integrations/__init__.py +0 -5
  50. posthog-5.4.0/posthog/exception_integrations/django.py +0 -117
  51. posthog-5.4.0/posthog/integrations/django.py +0 -121
  52. posthog-5.4.0/posthog/test/test_before_send.py +0 -171
  53. posthog-5.4.0/posthog/test/test_client.py +0 -1721
  54. posthog-5.4.0/posthog/test/test_exception_capture.py +0 -63
  55. posthog-5.4.0/posthog/test/test_module.py +0 -50
  56. posthog-5.4.0/posthog/utils.py +0 -200
  57. {posthog-5.4.0 → posthog-6.8.0}/LICENSE +0 -0
  58. {posthog-5.4.0 → posthog-6.8.0}/MANIFEST.in +0 -0
  59. {posthog-5.4.0 → posthog-6.8.0}/posthog/ai/__init__.py +0 -0
  60. {posthog-5.4.0 → posthog-6.8.0}/posthog/ai/langchain/__init__.py +0 -0
  61. {posthog-5.4.0 → posthog-6.8.0}/posthog/consumer.py +0 -0
  62. {posthog-5.4.0 → posthog-6.8.0}/posthog/integrations/__init__.py +0 -0
  63. {posthog-5.4.0 → posthog-6.8.0}/posthog/poller.py +0 -0
  64. {posthog-5.4.0 → posthog-6.8.0}/posthog/py.typed +0 -0
  65. {posthog-5.4.0 → posthog-6.8.0}/posthog/test/__init__.py +0 -0
  66. {posthog-5.4.0 → posthog-6.8.0}/posthog/test/test_consumer.py +0 -0
  67. {posthog-5.4.0 → posthog-6.8.0}/posthog/test/test_feature_flag.py +0 -0
  68. {posthog-5.4.0 → posthog-6.8.0}/posthog/test/test_request.py +0 -0
  69. {posthog-5.4.0 → posthog-6.8.0}/posthog/test/test_size_limited_dict.py +0 -0
  70. {posthog-5.4.0 → posthog-6.8.0}/posthog/test/test_types.py +0 -0
  71. {posthog-5.4.0 → posthog-6.8.0}/posthog.egg-info/dependency_links.txt +0 -0
  72. {posthog-5.4.0 → posthog-6.8.0}/posthog.egg-info/top_level.txt +0 -0
  73. {posthog-5.4.0 → posthog-6.8.0}/setup.cfg +0 -0
  74. {posthog-5.4.0 → posthog-6.8.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: posthog
3
- Version: 5.4.0
3
+ Version: 6.8.0
4
4
  Summary: Integrate PostHog into any python application.
5
5
  Home-page: https://github.com/posthog/posthog-python
6
6
  Author: Posthog
@@ -28,6 +28,7 @@ Requires-Dist: six>=1.5
28
28
  Requires-Dist: python-dateutil>=2.2
29
29
  Requires-Dist: backoff>=1.10.0
30
30
  Requires-Dist: distro>=1.5.0
31
+ Requires-Dist: typing-extensions>=4.2.0
31
32
  Provides-Extra: langchain
32
33
  Requires-Dist: langchain>=0.2.0; extra == "langchain"
33
34
  Provides-Extra: dev
@@ -106,7 +107,7 @@ We recommend using [uv](https://docs.astral.sh/uv/). It's super fast.
106
107
  ```bash
107
108
  uv python install 3.9.19
108
109
  uv python pin 3.9.19
109
- uv venv env
110
+ uv venv
110
111
  source env/bin/activate
111
112
  uv sync --extra dev --extra test
112
113
  pre-commit install
@@ -119,7 +120,9 @@ Assuming you have a [local version of PostHog](https://posthog.com/docs/developi
119
120
 
120
121
  ### Releasing Versions
121
122
 
122
- Updates are released using GitHub Actions: after bumping `version.py` in `master` and adding to `CHANGELOG.md`, go to [our release workflow's page](https://github.com/PostHog/posthog-python/actions/workflows/release.yaml) and dispatch it manually, using workflow from `master`.
123
+ Updates are released automatically using GitHub Actions when `version.py` is updated on `master`. After bumping `version.py` in `master` and adding to `CHANGELOG.md`, the [release workflow](https://github.com/PostHog/posthog-python/blob/master/.github/workflows/release.yaml) will automatically trigger and deploy the new version.
124
+
125
+ If you need to check the latest runs or manually trigger a release, you can go to [our release workflow's page](https://github.com/PostHog/posthog-python/actions/workflows/release.yaml) and dispatch it manually, using workflow from `master`.
123
126
 
124
127
 
125
128
  ### Testing changes locally with the PostHog app
@@ -32,7 +32,7 @@ We recommend using [uv](https://docs.astral.sh/uv/). It's super fast.
32
32
  ```bash
33
33
  uv python install 3.9.19
34
34
  uv python pin 3.9.19
35
- uv venv env
35
+ uv venv
36
36
  source env/bin/activate
37
37
  uv sync --extra dev --extra test
38
38
  pre-commit install
@@ -45,7 +45,9 @@ Assuming you have a [local version of PostHog](https://posthog.com/docs/developi
45
45
 
46
46
  ### Releasing Versions
47
47
 
48
- Updates are released using GitHub Actions: after bumping `version.py` in `master` and adding to `CHANGELOG.md`, go to [our release workflow's page](https://github.com/PostHog/posthog-python/actions/workflows/release.yaml) and dispatch it manually, using workflow from `master`.
48
+ Updates are released automatically using GitHub Actions when `version.py` is updated on `master`. After bumping `version.py` in `master` and adding to `CHANGELOG.md`, the [release workflow](https://github.com/PostHog/posthog-python/blob/master/.github/workflows/release.yaml) will automatically trigger and deploy the new version.
49
+
50
+ If you need to check the latest runs or manually trigger a release, you can go to [our release workflow's page](https://github.com/PostHog/posthog-python/actions/workflows/release.yaml) and dispatch it manually, using workflow from `master`.
49
51
 
50
52
 
51
53
  ### Testing changes locally with the PostHog app