NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #572 most downloaded on PyPI
Integrate PostHog into any python application.
Last release today
01 Oct 2026
Ships on a steady schedule
a new release about every 8 days
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
313 releases · first in 2020
One column per quarter.
feat: Add support for feature flag dependencies
fix: Prevent NoneType error when group_properties is None
NoneType error when group_properties is Nonefeat: Add flag_keys_to_evaluate parameter to optimize feature flag evaluation performance by only evaluating specified flags
flag_keys_to_evaluate parameter to optimize feature flag evaluation performance by only evaluating specified flagsflag_keys_filter option to send_feature_flags for selective flag evaluation in capture eventsfeat: Add $context_tags to an event to know which properties were included as tags
$context_tags to an event to know which properties were included as tagsfix: Always pass project API key in remote_config requests for deterministic project routing
remote_config requests for deterministic project routingfeat: support Vertex AI for Gemini
fix: set $ai_tools for all providers and $ai_output_choices for all non-streaming provider flows properly
$ai_tools for all providers and $ai_output_choices for all non-streaming provider flows properlyfix: get_feature_flag_result now correctly returns FeatureFlagResult when payload is empty string instead of None
get_feature_flag_result now correctly returns FeatureFlagResult when payload is empty string instead of Nonefix: Anthropic's tool calls are now handled properly
Nothing published for this version
feat: Enhanced send_feature_flags parameter to accept SendFeatureFlagsOptions object for declarative control over local/remote evaluation and custom p
send_feature_flags parameter to accept SendFeatureFlagsOptions object for declarative control over local/remote evaluation and custom propertiesfeat: make posthog_client an optional argument in PostHog AI providers wrappers (posthog.ai.*), intuitively using the default client as the default
posthog_client an optional argument in PostHog AI providers wrappers (posthog.ai.*), intuitively using the default client as the defaultfix: correctly capture exceptions processed by Django from views or middleware
feat: decouple feature flag local evaluation from personal API keys; support decrypting remote config payloads without relying on the feature flags po
fix: add POSTHOG_MW_CLIENT setting to django middleware, to support custom clients for exception capture.
feat: add a feature flag evaluation cache (local storage or redis) to support returning flag evaluations when the service is down
fix: send_feature_flags changed to default to false in Client::capture_exception
Client::capture_exceptionfix: response $process_person_profile property when passed to capture
$process_person_profile property when passed to captureThis release contains a number of major breaking changes:
This release contains a number of major breaking changes:
Optional[str], which is the UUID of the sent event, if it was sentidentify (prefer posthog.set()), and page and screen (prefer posthog.capture())Integration.To migrate to this version, you'll mostly just need to switch to using named keyword arguments, rather than positional ones. For example:
# Old calling convention
posthog.capture("user123", "button_clicked", {"button_id": "123"})
# New calling convention
posthog.capture(distinct_id="user123", event="button_clicked", properties={"button_id": "123"})
# Better pattern
with posthog.new_context():
posthog.identify_context("user123")
# The event name is the first argument, and can be passed positionally, or as a keyword argument in a later position
posthog.capture("button_pressed")
Generally, arguments are now appropriately typed, and docstrings have been updated. If something is unclear, please open an issue, or submit a PR!
feat: add support to session_id context on page method
fix: safely handle exception values
feat: construct artificial stack traces if no traceback is available on a captured exception
feat: session and distinct ID's can now be associated with contexts, and are used as such
fix: removed deprecated sentry integration
fix: no longer fail in autocapture.
feat(ai): track reasoning and cache tokens in the LangChain callback
fix: export scoped, rather than tracked, decorator
feat: add support for parse endpoint in responses API (no longer beta)
fix: replace import posthog with direct method imports
import posthog with direct method importsfix: replace import posthog in posthoganalytics package
import posthog in posthoganalytics packagefeat: add additional user and request context to captured exceptions via the Django integration
setup() function to initialise default client- feat: add before_send callback
empty point release to fix release automation
empty point release to fix release automation
Use the new /flags endpoint for all feature flag evaluations (don't fall back to /decide at all)
/flags endpoint for all feature flag evaluations (don't fall back to /decide at all)New context manager with posthog.new_context()
posthog.new_context()posthog.tag(), posthog.get_tags(), posthog.clear_tags()@posthog.scoped - Creates context and captures exceptions thrown within the functionAdd support for google gemini
Add support for google gemini
Moved ai openai package to a composition approach over inheritance.
Moved ai openai package to a composition approach over inheritance.
Remove deprecated monotonic library. Use Python's core time.monotonic function instead
monotonic library. Use Python's core time.monotonic function insteadAdded new method get_feature_flag_result which returns a FeatureFlagResult object. This object breaks down the result of a feature flag into its enabl
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).Example:
result = posthog.get_feature_flag_result("my-flag", "distinct_id")
print(result.enabled) # True or False
print(result.variant) # 'the-variant-value' or None
print(result.payload) # {'foo': 'bar'}
print(result.get_value()) # 'the-variant-value' or True or False
print(result.reason) # 'matched condition set 2' (Not available for local evaluation)
Breaking change:
get_feature_flag_payload now deserializes payloads from JSON strings to Any. Previously, it returned the payload as a JSON encoded string.Before:
payload = get_feature_flag_payload('key', 'distinct_id') # "{\"some\": \"payload\"}"
After:
payload = get_feature_flag_payload('key', 'distinct_id') # {"some": "payload"}
Roll out new /flags endpoint to 100% of /decide traffic, excluding the top 10 customers.
/flags endpoint to 100% of /decide traffic, excluding the top 10 customers.Fix hash inclusion/exclusion for flag rollout
Roll out new /flags endpoint to 10% of /decide traffic
Add log_captured_exceptions option to proxy setup
log_captured_exceptions option to proxy setupAdd config option to log_captured_exceptions
log_captured_exceptionsExpand automatic retries to include read errors (e.g. RemoteDisconnected)
Add more information to $feature_flag_called events.
$feature_flag_called events./decide?v=4 endpoint which contains more information about feature flags.Support serializing dataclasses.
Add support for OpenAI Responses API.
Fix bug where None is sent as delta in azure
Add support for tool calls in OpenAI and Anthropic.
Improve quota-limited feature flag logs
1. Add support for Azure OpenAI.
The LangChain handler now captures tools in $ai_generation events, in property $ai_tools. This allows for displaying tools provided to the LLM call in
$ai_generation events, in property $ai_tools. This allows for displaying tools provided to the LLM call in PostHog UI. Note that support for $ai_tools in OpenAI and Anthropic SDKs is coming soon.feat: add some platform info to events
Fix async client support for OpenAI.
Support quota-limited feature flags
Evaluate feature flag payloads with case sensitivity correctly. Fixes
Add support for Bedrock Anthropic Usage
Automatically retry connection errors
Your coding agent can read these notes before it upgrades. Set up the MCP server →