mixpanel
Official Mixpanel library for Python
Decision gist · record as of 2026-08-14
Yes. This is the official Mixpanel Python library with active maintenance, low install friction, permissive licensing, and no known vulnerabilities. It supports Python 3.9–3.13 and provides both simple and secure authentication patterns. Install it if you need server-side Mixpanel integration; the API is straightforward and the dependency footprint is reasonable.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Mixpanel token must be obtained from your Mixpanel project.
- Low friction installation with a pure-wheel distribution.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing use in commercial and private projects with minimal restrictions beyond attribution and liability disclaimers.
last release 2026-07-27 (18 days) · last repo commit 2026-07-28 · 108 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 7,956,832 downloads/mo, #1,679 on PyPI
Alternatives
Verify before relying
pip install mixpanel
from mixpanel import Mixpanel
mp = Mixpanel('YOUR_TOKEN')
mp.track('user_id', 'button clicked', {'color': 'blue', 'size': 'large'})
mp.people_set('user_id', {'$first_name': 'John'})- Whether buffering and batching behavior is suitable for high-volume event scenarios without additional tuning.
- Performance characteristics when using service account credentials versus token-based authentication.
- Retry and failure-handling semantics for network errors or rate limiting.
What it is and what it does
Mixpanel is the official Python client for sending analytics events and user profile data to Mixpanel's servers. It provides a straightforward API for tracking user actions (events) and updating user properties (people profiles) from your Python backend, along with support for feature flag evaluation. The library handles HTTP communication via requests or httpx, validates data structures with pydantic, and supports both simple token-based authentication and more secure service account credentials for server-to-server integrations.
Typical workflows involve creating a Mixpanel instance with your project token, then calling track() to log user events with custom properties and people_set() to update user profile attributes. For enhanced security, you can configure service account credentials for authentication on protected operations. The library also supports custom consumers like BufferedConsumer for batching events before sending, and integrates with asgiref for ASGI compatibility.
Use it for
- Track user interactions (clicks, form submissions, page views) from a Python web backend to build user behavior analytics.
- Update user profile properties (name, email, subscription tier) in Mixpanel whenever user data changes in your application.
- Evaluate feature flags server-side using service account credentials to control feature rollouts and A/B tests.
- Batch and buffer events using custom consumers to reduce network overhead in high-traffic applications.
- Integrate analytics into Python web applications for automatic event collection and user profiling.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is the official Mixpanel Python library with active maintenance, low install friction, permissive licensing, and no known vulnerabilities. It supports Python 3.9–3.13 and provides both simple and secure authentication patterns. Install it if you need server-side Mixpanel integration; the API is straightforward and the dependency footprint is reasonable.
Install
mixpanel on PyPI
Before you install
Low friction installation with a pure-wheel distribution. Active maintenance with a recent release (18 days old) and steady commit activity. Depends on common, well-maintained libraries: requests, httpx, pydantic, asgiref, and json-logic.
Requires Python 3.9 or later. Mixpanel token must be obtained from your Mixpanel project.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and private projects with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install mixpanel
from mixpanel import Mixpanel
mp = Mixpanel('YOUR_TOKEN')
mp.track('user_id', 'button clicked', {'color': 'blue', 'size': 'large'})
mp.people_set('user_id', {'$first_name': 'John'})
Verify before relying
- Whether buffering and batching behavior is suitable for high-volume event scenarios without additional tuning.
- Performance characteristics when using service account credentials versus token-based authentication.
- Retry and failure-handling semantics for network errors or rate limiting.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packagesrequestshttpxpydanticasgirefjson-logic |
| Maintenance | Actively maintained 18 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,956,832 / month, #1,679 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Operating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9 |
Evidence: mixpanel-5.3.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 › “user profile updates mixpanel”
- mixpanelOfficial Python library for server-side Mixpanel integration,…
- analytics-pythonA Python client library that sends analytics events to the Segment…
- mixpanel-py-asyncProvides asynchronous event batching and flushing for the Mixpanel…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also mixpanel-py-async · segment-analytics-python · chargebee · amplitude-analytics · analytics-python · shotgun-api3 · posthog · auth0-python · kanaries-track · oai-statsig-python-core