Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tizz98/mixpanel-data-api-python
A simple python wrapper for the Mixpanel data export api.
https://github.com/tizz98/mixpanel-data-api-python
Last synced: 9 days ago
JSON representation
A simple python wrapper for the Mixpanel data export api.
- Host: GitHub
- URL: https://github.com/tizz98/mixpanel-data-api-python
- Owner: tizz98
- License: mit
- Created: 2015-12-28T16:05:06.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-29T20:24:33.000Z (almost 9 years ago)
- Last Synced: 2024-04-22T15:22:49.590Z (7 months ago)
- Language: Python
- Size: 18.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Mixpanel data
A simple python wrapper for the [Mixpanel data export api](https://mixpanel.com/docs/api-documentation/data-export-api).## Installation
### From Source
- `git clone [email protected]:tizz98/mixpanel-data-api-python.git`
- `cd mixpanel-data-api-python`
- `python setup.py install` or `pip install .`## Usage
#### Get Events in time frame
_from [mixpanel docs](https://mixpanel.com/docs/api-documentation/exporting-raw-data-you-inserted-into-mixpanel)_```python
from datetime import date
import mixpanel_data# Configure your api key and secret
mixpanel_data.set_key_and_secret(
"API_KEY",
"API_SECRET"
)from_date = date(2015, 11, 1)
to_date = date(2015, 11, 2)export = mixpanel_data.Export(from_date, to_date, 'Viewed report')
events = export.eventsfor event in events:
print event.event # Viewed reportproperties = event.properties
print properties.distinct_id # foo
print properties.time # 1329263748
```