Skip to main content

Extract Mixpanel raw events and store on S3

Project description

Extract Mixpanel raw events and store on S3

Features

  • Download raw events from the Mixpanel data api

  • Upload on S3

  • Store locally

  • Gzip compression

  • Retry download (5 times, wait 60s before retrying)

Notes:

  • Parameters can be set by environment variables (like MIXPANEL_KEY)

  • Download events of yesterday by default

Install

pip install mixpanel-extract

Usage

usage: mixpanel-extract [-h] [--mixpanel-key MIXPANEL_KEY]
                        [--mixpanel-secret MIXPANEL_SECRET]
                        [--s3-bucket S3_BUCKET] [--s3-prefix S3_PREFIX]
                        [--s3-key S3_KEY] [-o OUTPUT] [-z]
                        [--from-date YYYY-MM-DD] [--to-date YYYY-MM-DD]

optional arguments:
  -h, --help            show this help message and exit
  --mixpanel-key MIXPANEL_KEY
                        Mixpanel API key
                        [default=e43729b115512e367e71c86894244d5b]
  --mixpanel-secret MIXPANEL_SECRET
                        Mixpanel API secret
                        [default=2a188b9d1b41b0ce35e14703e65d7104]
  --s3-bucket S3_BUCKET
                        Store on S3 [default=None]
  --s3-prefix S3_PREFIX
                        Prefix for the S3 key
                        [default=e43729b115512e367e71c86894244d5b]
  --s3-key S3_KEY       Prefix for the S3 key [default=2015-03-08]
  -o OUTPUT, --output OUTPUT
                        Store in local filesystem [default=None]
  -z, --gzip            Store as GZIP file
  --from-date YYYY-MM-DD
                        Extract events from this date [default=2015-03-08]
  --to-date YYYY-MM-DD  Extract events up to this date [default=2015-03-08]

Example

export MIXPANEL_KEY=XXXXXXXXXXXXXXXXX
export MIXPANEL_SECRET=ZZZZZZZZZZZZZZZZZZZZ
mixpanel-extract --gzip --s3-bucket jean-mixpanel -o /jean.gz

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mixpanel_extract-0.1.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

mixpanel_extract-0.1-py2-none-any.whl (6.0 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page