posthog
Integrate PostHog into any python application.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, carries no security vulnerabilities, has low install friction, and is widely used (top 1000 on PyPI). MIT licensing is permissive. Install it if you need to send analytics or feature flag data from a Python application to PostHog; the minimal dependency footprint and current Python version support make it a straightforward choice.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; PostHog instance or cloud account needed to receive events.
- Low install friction with a pure-wheel distribution.
- Active maintenance with a release 1 day old as of the fact sheet date.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice.
last release 2026-08-13 (1 days) · last repo commit 2026-08-13 · 60 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 49,300,844 downloads/mo, #584 on PyPI
Alternatives
Verify before relying
pip install posthog
from posthog import Posthog
posthog = Posthog(
api_key='your-api-key',
host='https://app.posthog.com'
)
posthog.capture('user-id', 'event-name', {'property': 'value'})- Whether the SDK supports async event capture or only synchronous calls.
- Batch size limits and retry behavior when PostHog is unreachable.
- Memory footprint and performance impact under high event volume.
What it is and what it does
PostHog Python is an official SDK that connects Python applications to PostHog, a product analytics and feature management platform. It lets you capture user events, track feature flag evaluations, and send behavioral data to PostHog for analysis and segmentation. The SDK handles HTTP transport via requests, includes automatic retry logic through backoff, and works across modern Python versions (3.10, 3.11, 3.12, 3.13, 3.14).
Typical use cases include tracking user interactions in web services, logging feature flag decisions for A/B testing, and feeding analytics data into product dashboards. The SDK is lightweight, with only four runtime dependencies, and integrates into Django and Flask applications through documented middleware. It's maintained actively and carries no known vulnerabilities.
Use it for
- Track user events and interactions in a web application to build product analytics dashboards.
- Evaluate and log feature flag decisions to measure A/B test performance and feature adoption.
- Capture custom events in backend services to correlate user behavior across multiple systems.
- Integrate PostHog analytics into a Django or Flask application via framework-specific middleware.
- Send event data with custom properties to segment users and build cohorts in PostHog.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, carries no security vulnerabilities, has low install friction, and is widely used (top 1000 on PyPI). MIT licensing is permissive. Install it if you need to send analytics or feature flag data from a Python application to PostHog; the minimal dependency footprint and current Python version support make it a straightforward choice.
Install
posthog on PyPI
Before you install
Low install friction with a pure-wheel distribution. Active maintenance with a release 1 day old as of the fact sheet date. Requires Python 3.10 or later and depends on four lightweight runtime packages: requests, backoff, distro, and typing-extensions.
Requires Python 3.10 or later; PostHog instance or cloud account needed to receive events.
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice.
Quickstart
pip install posthog
from posthog import Posthog
posthog = Posthog(
api_key='your-api-key',
host='https://app.posthog.com'
)
posthog.capture('user-id', 'event-name', {'property': 'value'})
Verify before relying
- Whether the SDK supports async event capture or only synchronous calls.
- Batch size limits and retry behavior when PostHog is unreachable.
- Memory footprint and performance impact under high event volume.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesrequestsbackoffdistrotyping-extensions |
| Maintenance | Actively maintained 1 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 49,300,844 / month, #584 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: posthog-7.39.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “product analytics sdk python”
- posthogPostHog Python SDK integrates product analytics and feature flagging…
- posthoganalyticsSends event data and user properties to PostHog for product…
- amplitude-analyticsOfficial Amplitude backend SDK for Python that sends server-side…
Give your agent the search over MCP, or paste the wish link into any chat.
More Monitoring packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Provides generated Python code for OpenTelemetry semantic conventions, enabling standardized attribute naming and constant definitions for instrumentation and telemetry collection.
Install it if you are using OpenTelemetry and want to follow semantic conventions correctly.
Provides the reference implementation of the OpenTelemetry API for collecting and exporting traces, metrics, and logs from Python applications.
Provides the abstract API and interfaces for OpenTelemetry instrumentation in Python, defining how to emit traces, metrics, and logs without tying code to a specific SDK implementation.
Exports OpenTelemetry observability data to an OpenTelemetry Collector using Protobuf-encoded messages over HTTP.
Install it if you are using OpenTelemetry in Python and need to send data to a Collector over HTTP.
Provides automatic instrumentation commands and programmatic APIs to inject distributed tracing into Python applications without code changes, detecting and instrumenting packages used by your program.
Install it if you need distributed tracing without code changes and have compatible instrumented packages in your environment.
See also devcycle-python-server-sdk · growthbook · posthoganalytics · openfeature-sdk · analytics-python · openfeature-provider-flagd · openfeature-hooks-opentelemetry · optimizely-sdk · mixpanel · demisto-sdk