|
| 1 | +# mixpanel-python |
| 2 | + |
| 3 | +[](https://pypi.org/project/mixpanel) |
| 4 | +[](https://pypi.org/project/mixpanel) |
| 5 | +[](https://pypi.org/project/mixpanel) |
| 6 | + |
| 7 | + |
| 8 | +This is the official Mixpanel Python library. This library allows for |
| 9 | +server-side integration of Mixpanel. |
| 10 | + |
| 11 | +To import, export, transform, or delete your Mixpanel data, please see our |
| 12 | +[mixpanel-utils package](https://github.com/mixpanel/mixpanel-utils). |
| 13 | + |
| 14 | +## Installation |
| 15 | + |
| 16 | +The library can be installed using pip: |
| 17 | + |
| 18 | +```bash |
| 19 | +pip install mixpanel |
| 20 | +``` |
| 21 | + |
| 22 | +## Getting Started |
| 23 | + |
| 24 | +Typical usage usually looks like this: |
| 25 | + |
| 26 | +```python |
| 27 | +from mixpanel import Mixpanel |
| 28 | + |
| 29 | +mp = Mixpanel(YOUR_TOKEN) |
| 30 | + |
| 31 | +# tracks an event with certain properties |
| 32 | +mp.track(DISTINCT_ID, 'button clicked', {'color' : 'blue', 'size': 'large'}) |
| 33 | + |
| 34 | +# sends an update to a user profile |
| 35 | +mp.people_set(DISTINCT_ID, {'$first_name' : 'Ilya', 'favorite pizza': 'margherita'}) |
| 36 | +``` |
| 37 | + |
| 38 | +You can use an instance of the Mixpanel class for sending all of your events |
| 39 | +and people updates. |
| 40 | + |
| 41 | +## Additional Information |
| 42 | + |
| 43 | +* [Help Docs](https://www.mixpanel.com/help/reference/python) |
| 44 | +* [Full Documentation](http://mixpanel.github.io/mixpanel-python/) |
| 45 | +* [mixpanel-python-async](https://github.com/jessepollak/mixpanel-python-async); a third party tool for sending data asynchronously |
| 46 | +from the tracking python process. |
| 47 | + |
| 48 | +[](https://deepwiki.com/mixpanel/mixpanel-python) |
0 commit comments