posthog
Integrate PostHog into any python application.
Install
posthog on PyPI
pip
pip install posthoguv
uv add posthogpoetry
poetry add posthogPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — requests, backoff, distro, typing-extensions |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: posthog-7.39.0-py3-none-any.whl
About posthog
from the package's own PyPI description — quoted content, verbatim
PostHog Python
<p align="center"> <img alt="posthoglogo" src="https://user-images.githubusercontent.com/65415371/205059737-c8a4f836-4889-4654-902e-f302b187b6a0.png"> </p> <p align="center"> <a href="https://pypi.org/project/posthog/"><img alt="pypi installs" src="https://img.shields.io/pypi/v/posthog"/></a> <img alt="GitHub contributors" src="https://img.shields.io/github/contributors/posthog/posthog-python"> <img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/posthog/posthog-python"/> <img alt="GitHub closed issues" src="https://img.shields.io/github/issues-closed/posthog/posthog-python"/> </p>
Please see the main PostHog docs.
SDK usage examples and code snippets live in the official documentation so they stay up to date.
Python Version Support
| SDK Version | Python Versions Supported | Notes |
|---|---|---|
| 7.3.1+ | 3.10, 3.11, 3.12, 3.13, 3.14 | Added Python 3.14 support |
| 7.0.0 - 7.0.1 | 3.10, 3.11, 3.12, 3.13 | Dropped Python 3.9 support |
| 4.0.1 - 6.x | 3.9, 3.10, 3.11, 3.12,... |
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
PostHog Python SDK integrates product analytics and feature flagging into Python applications, sending events and flag evaluations to a PostHog instance for user behavior tracking and experimentation.
Low friction install with four lightweight runtime dependencies (requests, backoff, distro, typing-extensions). Active maintenance with a release on 2026-08-13 and recent commit activity; requires Python 3.10 or later.
MIT license permits commercial and private use with minimal restrictions, making it suitable for most deployment contexts.
Usage
pip install posthog
from posthog import Posthog
posthog = Posthog(api_key='your-key', host='https://your-instance.com')
posthog.capture(distinct_id='user-id', event='action_name')
Requires Python 3.10 or later; PostHog instance URL and API key must be provided.
Verdict: Production-ready analytics SDK with active maintenance, permissive MIT licensing, and low install friction. No known vulnerabilities and broad Python version support (3.10–3.14) make it a reliable choice for integrating PostHog into Python applications.
Needs verification
- Whether the SDK supports async/await patterns or is synchronous-only by default
- Batch event transmission behavior and any local queue or buffering guarantees
- Performance impact and memory footprint under high-volume event scenarios
Similar packages
permissive · top 1,000 on PyPI
snowplow-trackerpermissive · top 1,000 on PyPI
Authlibpermissive · top 1,000 on PyPI
gunicornpermissive · top 1,000 on PyPI
watchtowerpermissive · top 1,000 on PyPI
opentelemetry-instrumentation-asgipermissive · top 1,000 on PyPI
peeweeunclear · top 1,000 on PyPI
opencensuspermissive · top 1,000 on PyPI
Flask-SQLAlchemypermissive · top 1,000 on PyPI
sentry-sdkpermissive · top 1,000 on PyPI