---
name: PostHog Python
slug: posthog-python
type: github
source_url: https://github.com/PostHog/posthog-python
changelog_url: https://github.com/PostHog/posthog-python/blob/HEAD/CHANGELOG.md
organization: PostHog
organization_slug: posthog
total_releases: 177
latest_version: v7.12.0
latest_date: 2026-04-16
last_updated: 2026-04-19
tracking_since: 2020-11-23
canonical: https://releases.sh/posthog/posthog-python
organization_url: https://releases.sh/posthog
---

<Summary type="rolling" window-days="90" release-count="28">
The SDK broadened its AI capabilities while hardening feature flag evaluation and improving operational reliability. Prompt management shipped in v7.8.0, then expanded to support versioning and multimodal capture across OpenAI, Gemini, and Anthropic integrations. Local flag evaluation gained semver targeting, device_id bucketing, and ETag caching to reduce polling overhead. The library also tightened retry logic for timeouts and 401 errors, exposed the flag definition cache provider for custom implementations, and surfaced flag evaluation failures through a new `$feature_flag_error` property.
</Summary>

<Summary type="monthly" period="February 2026" release-count="10">
Feature flag evaluation expanded to support device_id as a bucketing identifier for local evaluation, while AI token tracking gained the ability to detect value overrides through a new $ai_tokens_source property. The month also hardened reliability across the board—fixing IP address property naming, preventing HTTP request storms on 401 errors during flag refreshes, and adding Retry-After header respect for 408 responses.
</Summary>

<Release version="v7.12.0" date="April 16, 2026" published="2026-04-16T08:39:21.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.12.0">
## What's Changed
* 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
</Release>

<Release version="v7.11.2" date="April 15, 2026" published="2026-04-15T15:45:05.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.11.2">
## What's Changed
* chore: add GitHub community health files by @marandaneto in https://github.com/PostHog/posthog-python/pull/505
* chore(deps): bump pyasn1 from 0.6.1 to 0.6.3 by @dependabot[bot] in https://github.com/PostHog/posthog-python/pull/465
* chore(deps): bump litellm from 1.82.6 to 1.83.0 in /examples/example-ai-dspy by @dependabot[bot] in https://github.com/PostHog/posthog-python/pull/487
* chore(deps): bump requests from 2.32.5 to 2.33.0 by @dependabot[bot] in https://github.com/PostHog/posthog-python/pull/473
* chore: update branch references to main by @marandaneto in https://github.com/PostHog/posthog-python/pull/506
* chore: update endpoint for flags local eval by @patricio-posthog in https://github.com/PostHog/posthog-python/pull/509

## New Contributors
* @dependabot[bot] made their first contribution in https://github.com/PostHog/posthog-python/pull/465

**Full Changelog**: https://github.com/PostHog/posthog-python/compare/v7.11.1...v7.11.2
</Release>

<Release version="v7.11.1" date="April 14, 2026" published="2026-04-14T11:04:58.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.11.1">
## What's Changed
* chore: add stale workflow for issues and PRs by @marandaneto in https://github.com/PostHog/posthog-python/pull/502
* fix(compliance): declare capabilities in health endpoint by @andehen in https://github.com/PostHog/posthog-python/pull/501
* feat: Add os_distro information to events by @parinporecha in https://github.com/PostHog/posthog-python/pull/467


**Full Changelog**: https://github.com/PostHog/posthog-python/compare/v7.11.0...v7.11.1
</Release>

<Release version="v7.11.0" date="April 10, 2026" published="2026-04-10T15:17:36.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.11.0">
## What's Changed
* fix(llma): graceful fallback in claude_agent_sdk wrapper by @andrewm4894 in https://github.com/PostHog/posthog-python/pull/495
* feat(llma): add $ai_stop_reason extraction for all providers by @carlos-marchal-ph in https://github.com/PostHog/posthog-python/pull/499
* feat: add Gemini embed_content tracking by @carlos-marchal-ph in https://github.com/PostHog/posthog-python/pull/498


**Full Changelog**: https://github.com/PostHog/posthog-python/compare/v7.10.3...v7.11.0
</Release>

<Release version="v7.10.3" date="April 8, 2026" published="2026-04-08T17:43:23.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.10.3">
## What's Changed
* fix: pass before_send through module-level setup by @sipa-echo-zaoa in https://github.com/PostHog/posthog-python/pull/472
* chore: add sampo changeset for before_send module-level setup fix (#472) by @marandaneto in https://github.com/PostHog/posthog-python/pull/489

## New Contributors
* @sipa-echo-zaoa made their first contribution in https://github.com/PostHog/posthog-python/pull/472

**Full Changelog**: https://github.com/PostHog/posthog-python/compare/v7.10.2...v7.10.3
</Release>

<Release version="v7.10.2" date="April 8, 2026" published="2026-04-08T13:50:37.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.10.2">
## What's Changed
* chore: configurabel endpoint for flags local evaluation by @patricio-posthog in https://github.com/PostHog/posthog-python/pull/483

## New Contributors
* @patricio-posthog made their first contribution in https://github.com/PostHog/posthog-python/pull/483

**Full Changelog**: https://github.com/PostHog/posthog-python/compare/v7.10.1...v7.10.2
</Release>

<Release version="v7.10.1" date="April 8, 2026" published="2026-04-08T11:22:24.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.10.1">
## What's Changed
* 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
</Release>

<Release version="v7.10.0" date="April 7, 2026" published="2026-04-07T16:54:46.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.10.0">
## What's Changed
* docs: add AI provider integration examples by @richardsolomou in https://github.com/PostHog/posthog-python/pull/466
* fix: update localhost port in examples from 8000 to 8010 by @parinporecha in https://github.com/PostHog/posthog-python/pull/453
* chore: pin litellm to 1.81.13 in example by @marandaneto in https://github.com/PostHog/posthog-python/pull/469
* feat: add minimum fastapi exception capture repro case by @marandaneto in https://github.com/PostHog/posthog-python/pull/470
* chore: enforce 7-day minimum release age via uv exclude-newer by @marandaneto in https://github.com/PostHog/posthog-python/pull/476
* chore(examples): migrate AI examples from pip to uv with locked versions by @richardsolomou in https://github.com/PostHog/posthog-python/pull/471
* feat(ai): add Claude Agent SDK integration for LLM analytics by @andrewm4894 in https://github.com/PostHog/posthog-python/pull/477
* docs: add AI provider examples for all LLM analytics integrations by @richardsolomou in https://github.com/PostHog/posthog-python/pull/478
* fix: propagate missing params in module-level wrapper functions by @dustinbyrne in https://github.com/PostHog/posthog-python/pull/479

## New Contributors
* @parinporecha made their first contribution in https://github.com/PostHog/posthog-python/pull/453

**Full Changelog**: https://github.com/PostHog/posthog-python/compare/v7.9.12...v7.10.0
</Release>

<Release version="v7.9.12" date="March 12, 2026" published="2026-03-12T09:01:28.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.9.12">
## What's Changed
* chore(flags): expose flag_definition_cache_provider by @matheus-vb in https://github.com/PostHog/posthog-python/pull/462

## New Contributors
* @matheus-vb made their first contribution in https://github.com/PostHog/posthog-python/pull/462

**Full Changelog**: https://github.com/PostHog/posthog-python/compare/v7.9.11...v7.9.12
</Release>

<Release version="v7.9.11" date="March 11, 2026" published="2026-03-11T19:21:05.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.9.11">
## What's Changed
* 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
</Release>

<Release version="v7.9.10" date="March 10, 2026" published="2026-03-10T21:28:53.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.9.10">
## What's Changed
* 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
</Release>

<Release version="v7.9.9" date="March 10, 2026" published="2026-03-10T20:40:39.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.9.9">
## What's Changed
* 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
</Release>

<Release version="v7.9.8" date="March 9, 2026" published="2026-03-09T14:34:21.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.9.8">
## What's Changed
* feat(llma): support prompt versions in prompts sdk by @Radu-Raicea in https://github.com/PostHog/posthog-python/pull/454
* chore(llma): apply prompt SDK review cleanups by @Radu-Raicea in https://github.com/PostHog/posthog-python/pull/456


**Full Changelog**: https://github.com/PostHog/posthog-python/compare/v7.9.7...v7.9.8
</Release>

<Release version="v7.9.7" date="March 5, 2026" published="2026-03-05T22:10:11.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.9.7">
## What's Changed
* fix(llma): use distinct_id from outer context if not provided by @ethanporcaro in https://github.com/PostHog/posthog-python/pull/449
* Add warning log for local flag evaluation cold start by @dmarticus in https://github.com/PostHog/posthog-python/pull/452

## New Contributors
* @ethanporcaro made their first contribution in https://github.com/PostHog/posthog-python/pull/449

**Full Changelog**: https://github.com/PostHog/posthog-python/compare/v7.9.6...v7.9.7
</Release>

<Release version="v7.9.6" date="March 2, 2026" published="2026-03-02T21:29:13.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.9.6">
## What's Changed
* 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
</Release>

<Release version="v7.9.5" date="March 2, 2026" published="2026-03-02T20:54:23.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.9.5">
## What's Changed
* 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
</Release>

<Release version="v7.9.4" date="February 25, 2026" published="2026-02-25T15:29:02.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.9.4">
## What's Changed
* fix: use $ip not $ip_addess by @iloveitaly in https://github.com/PostHog/posthog-python/pull/356
* feat(llma): add $ai_tokens_source property to detect token value overrides by @andrewm4894 in https://github.com/PostHog/posthog-python/pull/444
* fix: revert manual release and add sampo changeset for ai_tokens_source by @carlos-marchal-ph in https://github.com/PostHog/posthog-python/pull/445

## New Contributors
* @iloveitaly made their first contribution in https://github.com/PostHog/posthog-python/pull/356

**Full Changelog**: https://github.com/PostHog/posthog-python/compare/v7.9.3...v7.9.4
</Release>

<Release version="v7.9.3" date="February 18, 2026" published="2026-02-18T22:20:39.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.9.3">
## What's Changed
* 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
</Release>

<Release version="v7.9.2" date="February 18, 2026" published="2026-02-18T22:12:25.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.9.2">
## What's Changed
* fix(ai): bind prompt reads to project token by @Radu-Raicea in https://github.com/PostHog/posthog-python/pull/433
* chore: Migrate releases to `sampo` by @rafaeelaudibert in https://github.com/PostHog/posthog-python/pull/398


**Full Changelog**: https://github.com/PostHog/posthog-python/compare/v7.9.0...v7.9.2
</Release>

<Release version="v7.9.0" date="February 17, 2026" published="2026-02-17T09:32:41.000Z" url="https://github.com/PostHog/posthog-python/releases/tag/v7.9.0">
## 7.9.0

## What's Changed
* test(flags): make wrong-key load_feature_flags deterministic by @andehen in https://github.com/PostHog/posthog-python/pull/432
* feat: Support device_id as bucketing identifier for local evaluation by @andehen in https://github.com/PostHog/posthog-python/pull/424
* chore: release v7.9.0 by @andehen in https://github.com/PostHog/posthog-python/pull/434


**Full Changelog**: https://github.com/PostHog/posthog-python/compare/v7.8.6...v7.9.0
</Release>

<Pagination page="1" total-pages="9" total-items="177" next="https://releases.sh/posthog/posthog-python.md?page=2" />
