This is the official Mixpanel Python library. This library allows for server-side integration of Mixpanel.
The library can be installed using pip:
pip install mixpanel-py
Typical usage usually looks like this:
#!/usr/bin/env python
from mixpanel import Mixpanel
mp = Mixpanel(YOUR_TOKEN)
# tracks an event with certain properties
mp.track('button clicked', {'color' : 'blue', 'size': 'large'})
# sends an update to a user profile
mp.people_set(USER_ID, {'$first_name' : 'Amy', 'favorite color': 'red'})
You can use an instance of the Mixpanel class for sending all of your events and people updates.