{ "info": { "author": "Dillon Dixon", "author_email": "dillondixon@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "# mixpanel-export-stream\nA small Python library for exporting and reading raw event data from Mixpanel while taking advantage of the streamable JSONLine data format.\n\nThis library is based on the Mixpanel's own data export library found [here](https://mixpanel.com/site_media/api/v2/mixpanel.py).\n\n## Installation\nTo install the mixpanel export library, simply run the following:\n\n`pip install mixpanel_export`\n\n## What do you mean by a \"stream\"?\n\nMixpanel's raw event data API returns data in JSONLine format, meaning each event is a JSON object on its own line.\n\nMixpanel gives a warning to **not** attempt to read this data until it has downloaded in its entirety due to being zipped in `gzip` format, but this compression type is streamable, meaning it shouldn't matter.\n\nStreaming reduces the footprint in RAM significantly as compared to Mixpanel's own Python API implementation when you only care about doing reduces over events.\n\n## Example\n\nLet's assume we want to get all events 'A' with a property 'B' that is equal to \"2\". Events 'A' also have a property 'C', which is some random string value. We want the results grouped and tallied by 'C' to see how many property 'C' events occurred.\n\nThis is simple and fast to do with this library.\n\n```python\nfrom collections import Counter\nfrom mixpanel_export import EventStream\n\napi_key = '...'\napi_secret = '...'\n\nes = EventStream(api_key, api_secret)\n\nparams = {\n 'event': [\"A\"],\n 'from_date': '...',\n 'to_date': '...',\n 'where': 'property[\"B\"] == \"2\"'\n}\n\ncount = Counter()\n\n\ndef do_count(e):\n count[e['properties']['C']] += 1\n\n# allow the request a maximum of 5 minutes (300 seconds) before expiring\ntotal = es.request(params, do_count, expire=300)\nprint(\"Total events processed %s, tally: %s\" % (total, count))\n```\n\nFor more details on what you can use for the `params` argument, refer to Mixpanel's documentation [here](https://mixpanel.com/docs/api-documentation/data-export-api).", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ownaginatious/mixpanel-export-stream", "keywords": "mixpanel,export,stream", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "mixpanel_export", "package_url": "https://pypi.org/project/mixpanel_export/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mixpanel_export/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ownaginatious/mixpanel-export-stream" }, "release_url": "https://pypi.org/project/mixpanel_export/0.2.post7/", "requires_dist": null, "requires_python": null, "summary": "A streaming library for reading raw event data from Mixpanel's export API", "version": "0.2.post7" }, "last_serial": 2097790, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "e046a7260e5fbb461dc06a9d72799d36", "sha256": "8c0f9691ce1888eb4b77031811d526d0d1872b2045d5113c0292b6169424adf4" }, "downloads": -1, "filename": "mixpanel_export-0.1.tar.gz", "has_sig": false, "md5_digest": "e046a7260e5fbb461dc06a9d72799d36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1598, "upload_time": "2015-10-23T21:35:45", "url": "https://files.pythonhosted.org/packages/78/55/2ddfe4cb817d36c694b97e00aee345402836f621d4c7167aae9981136e2f/mixpanel_export-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "08ea160ff3730b245df3fb34e5c8f64c", "sha256": "32dadfbd942cdeb877c8e0fd74e9e00373805a46c93a19be83dc41a48c343c20" }, "downloads": -1, "filename": "mixpanel_export-0.2.tar.gz", "has_sig": false, "md5_digest": "08ea160ff3730b245df3fb34e5c8f64c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1583, "upload_time": "2015-12-10T01:36:56", "url": "https://files.pythonhosted.org/packages/da/bf/f9c4aa0e2274848dcfb9150cf663457f4b8afe46ca273929972192a675eb/mixpanel_export-0.2.tar.gz" } ], "0.2.post3": [ { "comment_text": "", "digests": { "md5": "6ece169b6f3e34ca0483cd0ec4a5a62d", "sha256": "38e7f20dfa1feecfa2ee45f9e216cb64109adf6deb5d95de34c02de2dbbc80bb" }, "downloads": -1, "filename": "mixpanel_export-0.2.post3.tar.gz", "has_sig": false, "md5_digest": "6ece169b6f3e34ca0483cd0ec4a5a62d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22115, "upload_time": "2016-04-23T01:46:20", "url": "https://files.pythonhosted.org/packages/a7/90/439789255437d12a3bc9fe6d6edd4fe5cdb66efd7e0f4f5ae43cbd0ae7bc/mixpanel_export-0.2.post3.tar.gz" } ], "0.2.post4": [ { "comment_text": "", "digests": { "md5": "0c280954b8f97efa81304179c803900d", "sha256": "55c54ce1021c90bbf21111c0135322f6b8419b639acef1ddc922e80a0db923e8" }, "downloads": -1, "filename": "mixpanel_export-0.2.post4.tar.gz", "has_sig": false, "md5_digest": "0c280954b8f97efa81304179c803900d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23837, "upload_time": "2016-05-03T20:21:50", "url": "https://files.pythonhosted.org/packages/6d/36/2d9dbc8e9adde2ce7790e6d74044c5576a90c4050d7d246ee95a8d358fdd/mixpanel_export-0.2.post4.tar.gz" } ], "0.2.post4.dev0": [ { "comment_text": "", "digests": { "md5": "00762e8e6a04f473e326f75ab9ff4fe9", "sha256": "1ead9424694628d2b50383ebf8fd68f5da6531072a828609025a106950540cab" }, "downloads": -1, "filename": "mixpanel_export-0.2.post4.dev0.tar.gz", "has_sig": false, "md5_digest": "00762e8e6a04f473e326f75ab9ff4fe9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23850, "upload_time": "2016-05-03T20:42:01", "url": "https://files.pythonhosted.org/packages/c7/99/aaf5ad9f5406e1ef77419c52649a50de4c9ac421a6ffdd266870ff157534/mixpanel_export-0.2.post4.dev0.tar.gz" } ], "0.2.post5": [ { "comment_text": "", "digests": { "md5": "61d7c7250e9bf5676376054743bb81f3", "sha256": "83c6a9d69a584c17028bc03ae1b8c09d64bda6ddd5a3de0136138daab96dd6ed" }, "downloads": -1, "filename": "mixpanel_export-0.2.post5.tar.gz", "has_sig": false, "md5_digest": "61d7c7250e9bf5676376054743bb81f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23835, "upload_time": "2016-05-03T20:43:52", "url": "https://files.pythonhosted.org/packages/11/48/512a6944c949cd59745b0a6945251a28c25c50e9389497ef94ad147e4dd2/mixpanel_export-0.2.post5.tar.gz" } ], "0.2.post6": [ { "comment_text": "", "digests": { "md5": "0b425ccbe8da2131c4ed02f14b1f70b2", "sha256": "c7f7407590972e3f74c23fd95b5d8a730f18a808dc499fd37e0049b90307f749" }, "downloads": -1, "filename": "mixpanel_export-0.2.post6.tar.gz", "has_sig": false, "md5_digest": "0b425ccbe8da2131c4ed02f14b1f70b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19715, "upload_time": "2016-05-03T20:53:40", "url": "https://files.pythonhosted.org/packages/a1/f4/c0c00c7b18e6059e157a16c34671e5075ef25fe9601f2f98bf2d08135693/mixpanel_export-0.2.post6.tar.gz" } ], "0.2.post7": [ { "comment_text": "", "digests": { "md5": "86d38971f274843686aa8728beb13077", "sha256": "10eee808d1b140071898d5ba8eb5419d359a8bb7e7a8f271560191ae1b384dcd" }, "downloads": -1, "filename": "mixpanel_export-0.2.post7.tar.gz", "has_sig": false, "md5_digest": "86d38971f274843686aa8728beb13077", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19715, "upload_time": "2016-05-03T21:26:43", "url": "https://files.pythonhosted.org/packages/21/10/b608c2b1c110f2a841b39b0a011a00810c361249825c256ebfd5641f1f25/mixpanel_export-0.2.post7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "86d38971f274843686aa8728beb13077", "sha256": "10eee808d1b140071898d5ba8eb5419d359a8bb7e7a8f271560191ae1b384dcd" }, "downloads": -1, "filename": "mixpanel_export-0.2.post7.tar.gz", "has_sig": false, "md5_digest": "86d38971f274843686aa8728beb13077", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19715, "upload_time": "2016-05-03T21:26:43", "url": "https://files.pythonhosted.org/packages/21/10/b608c2b1c110f2a841b39b0a011a00810c361249825c256ebfd5641f1f25/mixpanel_export-0.2.post7.tar.gz" } ] }