Skip to content

mixpanel/mixpanel-python

Folders and files

NameName
Last commit message
Last commit date
Mar 8, 2024
Mar 9, 2015
Mar 8, 2024
Mar 8, 2024
Dec 18, 2020
Feb 23, 2021
Jun 21, 2021
Dec 17, 2020
Jun 21, 2021
Jul 25, 2022
Apr 16, 2015
Mar 8, 2024
Jul 25, 2022
Mar 8, 2024

Repository files navigation

mixpanel-python

PyPI PyPI - Python Version PyPI - Downloads

This is the official Mixpanel Python library. This library allows for server-side integration of Mixpanel.

To import, export, transform, or delete your Mixpanel data, please see our mixpanel-utils package.

Installation

The library can be installed using pip:

pip install mixpanel

Getting Started

Typical usage usually looks like this:

from mixpanel import Mixpanel

mp = Mixpanel(YOUR_TOKEN)

# tracks an event with certain properties
mp.track(DISTINCT_ID, 'button clicked', {'color' : 'blue', 'size': 'large'})

# sends an update to a user profile
mp.people_set(DISTINCT_ID, {'$first_name' : 'Ilya', 'favorite pizza': 'margherita'})

You can use an instance of the Mixpanel class for sending all of your events and people updates.

Additional Information