--- id: mixpanel version: "5.3.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # mixpanel — Official Mixpanel library for Python License: permissive · Maintenance: active · Downloads: 8.0M/mo ## 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 above — verify before relying. Official Python library for server-side Mixpanel integration, enabling event tracking, user profile updates, and feature flag evaluation. 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 pip install mixpanel uv add mixpanel poetry add mixpanel ## Installing mixpanel 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. 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'}) Requires Python 3.9 or later. Mixpanel token must be obtained from your Mixpanel project. 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_current - Install friction: low - Maintenance: active - Downloads: 8.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags mixpanel event tracking python, server-side analytics library, user profile updates mixpanel, feature flags python sdk, mixpanel service account auth, analytics data collection python, mixpanel api client, analytics, event-tracking, service-account-auth [View on SkillFed](https://skillfed.io/packages/mixpanel) · [View on PyPI](https://pypi.org/project/mixpanel/)