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
30 Sep 2026
Ships on a steady schedule
a new release about every 8 days
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
312 releases · first in 2020
One column per quarter.
chore: use engineering@posthog.com in package metadata by @marandaneto in https://github.com/PostHog/posthog-python/pull/514
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.12.0...7.13.0
capture_errors option to Prompts that reports prompt fetch failures to PostHog error tracking via capture_exception() when enabled. — Thanks @andrewm4894!chore: merge master into main by @marandaneto in https://github.com/PostHog/posthog-python/pull/513
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.11.2...v7.12.0
Prompts.get() now accepts with_metadata=True and returns a PromptResult dataclass containing source (api, cache, stale_cache, or code_fallback), name, and version alongside the prompt text. The previous plain-string return is deprecated and will be removed in a future major version. — Thanks @marandaneto!chore: add GitHub community health files by @marandaneto in https://github.com/PostHog/posthog-python/pull/505
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.11.1...v7.11.2
/api/feature_flag/local_evaluation to /flags/definitions — Thanks @patricio-posthog!chore: add stale workflow for issues and PRs by @marandaneto in https://github.com/PostHog/posthog-python/pull/502
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.11.0...v7.11.1
fix(llma): graceful fallback in claude_agent_sdk wrapper by @andrewm4894 in https://github.com/PostHog/posthog-python/pull/495
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.10.3...v7.11.0
embed_content tracking support for both sync and async clients — Thanks @carlos-marchal-ph!fix: pass before_send through module-level setup by @sipa-echo-zaoa in https://github.com/PostHog/posthog-python/pull/472
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.10.2...v7.10.3
posthog.before_send callback into the lazily initialized default client — Thanks @marandaneto!chore: configurabel endpoint for flags local evaluation by @patricio-posthog in https://github.com/PostHog/posthog-python/pull/483
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.10.1...v7.10.2
POSTHOG_LOCAL_EVALUATION_ENDPOINT env var with fallback to default endpoint — Thanks @patricio-posthog for your first contribution 🎉!fix: pass capture_exceptions as keyword arg in Django middleware by @marandaneto in https://github.com/PostHog/posthog-python/pull/488
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.10.0...v7.10.1
docs: add AI provider integration examples by @richardsolomou in https://github.com/PostHog/posthog-python/pull/466
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.9.12...v7.10.0
distinct_id for group_identify, flag_keys_to_evaluate for get_all_flags/get_all_flags_and_payloads) — Thanks @dustinbyrne!chore(flags): expose flag_definition_cache_provider by @matheus-vb in https://github.com/PostHog/posthog-python/pull/462
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.9.11...v7.9.12
chore(ci): fix release attribution by @Piccirello in https://github.com/PostHog/posthog-python/pull/461
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.9.10...v7.9.11
fix(ci): attribute release tag to GitHub App by @Piccirello in https://github.com/PostHog/posthog-python/pull/460
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.9.9...v7.9.10
Update release.yml to support commit signing by @Piccirello in https://github.com/PostHog/posthog-python/pull/458
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.9.8...v7.9.9
feat(llma): support prompt versions in prompts sdk by @Radu-Raicea in https://github.com/PostHog/posthog-python/pull/454
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.9.7...v7.9.8
fix(llma): use distinct_id from outer context if not provided by @ethanporcaro in https://github.com/PostHog/posthog-python/pull/449
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.9.6...v7.9.7
refactor: add PROPERTY_OPERATORS constant for match_property by @dmarticus in https://github.com/PostHog/posthog-python/pull/448
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.9.5...v7.9.6
feat: add semver targeting support to local flag evaluation by @dmarticus in https://github.com/PostHog/posthog-python/pull/447
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.9.4...v7.9.5
fix: use $ip not $ip_addess by @iloveitaly in https://github.com/PostHog/posthog-python/pull/356
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.9.3...v7.9.4
$ai_tokens_source property ("sdk" or "passthrough") to all $ai_generation events to detect when token values are externally overridden via posthog_properties — Thanks @carlos-marchal-ph!Small fixes for python publishing by @rafaeelaudibert in https://github.com/PostHog/posthog-python/pull/441
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.9.2...v7.9.3
fix(ai): bind prompt reads to project token by @Radu-Raicea in https://github.com/PostHog/posthog-python/pull/433
sampo by @rafaeelaudibert in https://github.com/PostHog/posthog-python/pull/398Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.9.0...v7.9.2
fix(llma): make prompt fetches deterministic by requiring project_api_key and sending it as token query param
fix(llma): make prompt fetches deterministic by requiring project_api_key and sending it as token query param
test(flags): make wrong-key load_feature_flags deterministic by @andehen in https://github.com/PostHog/posthog-python/pull/432
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.8.6...v7.9.0
feat: limit max number of items in collection to scan by @ablaszkiewicz in https://github.com/PostHog/posthog-python/pull/430
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.8.5...v7.8.6
feat: further optimize code variables regex search by @ablaszkiewicz in https://github.com/PostHog/posthog-python/pull/429
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.8.4...v7.8.5
fix: Retry on 408 and respect Retry-After header by @andehen in https://github.com/PostHog/posthog-python/pull/426
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.8.3...v7.8.4
Fix feature flag 401 errors causing HTTP request storm by @GabiGrin in https://github.com/PostHog/posthog-python/pull/422
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.8.2...v7.8.3
fix(llma): default prompts url by @Radu-Raicea in https://github.com/PostHog/posthog-python/pull/423
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.8.1...v7.8.2
feat: SDK Compliance by @jose-sequeira in https://github.com/PostHog/posthog-python/pull/397
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.8.0...v7.8.1
feat(llma): pass raw provider usage metadata for backend cost calculations by @richardsolomou in https://github.com/PostHog/posthog-python/pull/411
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.7.0...v7.8.0
feat(llma): add prompt management
Adds the Prompt Management feature. At the time of release, this feature is in a closed alpha.
feat(ai): add OpenAI Agents SDK integration by @andrewm4894 in https://github.com/PostHog/posthog-python/pull/408
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.6.0...v7.7.0
feat(ai): Add OpenAI Agents SDK integration
Automatic tracing for agent workflows, handoffs, tool calls, guardrails, and custom spans. Includes $ai_total_tokens, $ai_error_type categorization, and $ai_framework property.
chore: check for syntax warnings by @pauldambra in https://github.com/PostHog/posthog-python/pull/404
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.5.1...v7.6.0
feat: add device_id to flags request payload
Add device_id parameter to all feature flag methods, allowing the server to track device identifiers for flag evaluation. The device_id can be passed explicitly or set via context using set_context_device_id().
chore: add a test to describe upload behaviour when there are errors by @pauldambra in https://github.com/PostHog/posthog-python/pull/403
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.5.0...v7.5.1
fix: avoid return from finally block to fix Python 3.14 SyntaxWarning (#361) - thanks @jodal
feat: llma / error tracking integration by @daibhin in https://github.com/PostHog/posthog-python/pull/376
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.4.3...v7.5.0
feat: Capture Langchain, OpenAI and Anthropic errors as exceptions (if exception autocapture is enabled) feat: Add reference to exception in LLMA trace and span events
fix: double counting anthropic langchain by @carlos-marchal-ph in https://github.com/PostHog/posthog-python/pull/399
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.4.2...v7.4.3
feat: add in_app configuration for python SDK by @hpouillot in https://github.com/PostHog/posthog-python/pull/396
Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.4.1...v7.4.2
fix: Respect send_feature_flags setting and deprecate send_feature_flag_events in get_feature_flag_payload by @dustinbyrne in https://github.com/PostH…
send_feature_flags setting and deprecate send_feature_flag_events in get_feature_flag_payload by @dustinbyrne in https://github.com/PostHog/posthog-python/pull/391Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.4.0...v7.4.1
fix: extract model from response for OpenAI stored prompts
When using OpenAI stored prompts, the model is defined in the OpenAI dashboard rather than passed in the API request. This fix adds a fallback to extract the model from the response object when not provided in kwargs, ensuring generations show up with the correct model and enabling cost calculations.
feat(llma): multimodal-capture by @carlos-marchal-ph in https://github.com/PostHog/posthog-python/pull/378
$feature_flag_error property to track flag evaluation failures by @haacked in https://github.com/PostHog/posthog-python/pull/390Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.3.1...v7.4.0
feat: Add automatic retries for feature flag requests
Feature flag API requests now automatically retry on transient failures:
Rate limit (429) and quota (402) errors are not retried.
feat: add python 3.14 support by @carlos-marchal-ph in https://github.com/PostHog/posthog-python/pull/373
evaluated_at properties in $feature_flag_called events by @dmarticus in https://github.com/PostHog/posthog-python/pull/374Full Changelog: https://github.com/PostHog/posthog-python/compare/v7.0.1...v7.3.1
Try to use repr() when formatting code variables
(BREAKING) Python 3.9 is no longer supported
(BREAKING) Python 3.9 is no longer supported
chore(llma): update LLM provider SDKs to latest major versions
feat(ph-ai): PostHog properties dict in GenerationMetadata
fix(llma): fix cache token double subtraction in Langchain for non-Anthropic providers causing negative costs
fix(error-tracking): pass code variables config from init to client
feat(error-tracking): add local variables capture
feat(llma): send web search calls to be used for LLM cost calculations
fix(django): Handle request.user access in async middleware context to prevent SynchronousOnlyOperation errors in Django 5+ (fixes #355)
fix(llma): cache cost calculation in the LangChain callback
fix(django): Restore process_exception method to capture view and downstream middleware exceptions (fixes #329)
feat(ai): Add $ai_framework property for framework integrations (e.g. LangChain)
$ai_framework property for framework integrations (e.g. LangChain)fix(django): Make middleware truly hybrid - compatible with both sync (WSGI) and async (ASGI) Django stacks without breaking sync-only deployments
fix(flags): multi-condition flags with static cohorts returning wrong variants
fix(llma): missing async for OpenAI's streaming implementation
fix: remove deprecated attribute $exception_personURL from exception events
fix: don't sort condition sets with variant overrides to the top
feat: Django middleware now supports async request handling.
fix: Missing system prompts for some providers
fix: missing usage tokens in Gemini
fix: tool call results in streaming providers
fix: Add base64 inline image sanitization
feat: Add support for feature flag dependencies
Your coding agent can read these notes before it upgrades. Set up the MCP server →