{ "info": { "author": "Jos\u00e9 Padilla", "author_email": "jpadilla@webapplicate.com", "bugtrack_url": null, "classifiers": [], "description": "# Mandrill Inbound Python Wrapper [![Build Status](https://travis-ci.org/jpadilla/mandrill-inbound-python.png?branch=master)](https://travis-ci.org/jpadilla/mandrill-inbound-python)\n\n\nThis is a simple API wrapper for [Mandrill's inbound email webhook](http://help.mandrill.com/entries/22092308-What-is-the-format-of-inbound-email-webhooks-)\nin Python inspired by this other Python wrapper library I made for [Postmark Inbound](https://github.com/jpadilla/postmark-inbound-python).\n\n## Install\n\nUsing Github:\n\n```\ngit clone git://github.com/jpadilla/mandrill-inbound-python.git\n```\n\nUsing pip:\n\n```\npip install python-mandrill-inbound\n```\n\nUsing easy_install:\n\n```\neasy_install python-mandrill-inbound\n```\n\n\nUsage\n-----\n\n```python\nfrom mandrill_inbound import MandrillInbound\n\n\n# Load from JSON string\njson_data = open('./tests/fixtures/valid_http_post.json').read()\ninbound = MandrillInbound(json=json_data)\n\n# Load Python dictionary\njson_data = json.loads(open('./tests/fixtures/valid_http_post.json').read())\ninbound = MandrillInbound(source=json_data)\n\n# Content\nprint inbound.subject\nprint inbound.sender\nprint inbound.to\nprint inbound.cc\nprint inbound.recipients\nprint inbound.message_id\nprint inbound.mailbox_hash\nprint inbound.html_body\nprint inbound.text_body\nprint inbound.send_date\nprint inbound.ts\n\n# Spam and Spoofing Detection\nprint inbound.spf\nprint inbound.dkim\nprint inbound.spam_score\n\n# headers\nprint inbound.headers # default to get all headers\nprint inbound.headers['MIME-Version']\nprint inbound.headers['Received-SPF']\n\n# attachments\nprint inbound.has_attachments # boolean\nattachments = inbound.attachments\n\nfirst_attachment = attachments[0]\nprint first_attachment.name\n\nsecond_attachment = attachments[1]\nprint second_attachment.content_length\n\nfor a in attachments:\n\tprint a.name\n\tprint a.content_type\n\tprint a.read()\n\tprint a.download('./tests/', ['image/png'])\n\n# raw data\nprint inbound.source\nprint inbound.msg\n```\n\nBug tracker\n-----------\n\nHave a bug? Please create an issue here on GitHub!\n\n\nContributions\n-------------\n\n* Fork\n* Write tests\n* Write Code\n* Pull request\n\nThanks for your help.\n\n\nLicense\n---------------------\n\nMIT License", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/jpadilla/mandrill-inbound-python/tarball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jpadilla/mandrill-inbound-python", "keywords": null, "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "python-mandrill-inbound", "package_url": "https://pypi.org/project/python-mandrill-inbound/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/python-mandrill-inbound/", "project_urls": { "Download": "https://github.com/jpadilla/mandrill-inbound-python/tarball/master", "Homepage": "https://github.com/jpadilla/mandrill-inbound-python" }, "release_url": "https://pypi.org/project/python-mandrill-inbound/0.0.4/", "requires_dist": null, "requires_python": null, "summary": "Python wrapper for Mandrill Inbound", "version": "0.0.4" }, "last_serial": 1185924, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "5cd62ff0b9ecd3300205c3e82c5a141b", "sha256": "01d3b0f4fb96c6be8872f7110a6d35b1f6e10e62dc1432d87d943bd9cb577bc4" }, "downloads": -1, "filename": "python-mandrill-inbound-0.0.1.tar.gz", "has_sig": false, "md5_digest": "5cd62ff0b9ecd3300205c3e82c5a141b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2014, "upload_time": "2013-04-12T16:33:04", "url": "https://files.pythonhosted.org/packages/11/54/2f1982307480a83d18cf6b019e55c2949e1c05d30f78b395263fe03a0a7d/python-mandrill-inbound-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "5b99c54250074e3c7c314d9040903306", "sha256": "5508d6adf9e5b2fd88dc29320738ca494889c388b78c423b746852660248914a" }, "downloads": -1, "filename": "python-mandrill-inbound-0.0.2.tar.gz", "has_sig": false, "md5_digest": "5b99c54250074e3c7c314d9040903306", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3845, "upload_time": "2013-06-13T18:25:23", "url": "https://files.pythonhosted.org/packages/08/ca/d5bae9253b90fe66cea373098730005b3c11fe1e839db71f1d7f317abb60/python-mandrill-inbound-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "a1fa25607703a929b70925fe1838311f", "sha256": "98dc79529790eddadcc8ed0439400ea54e015c1a566c445d48914fd7b5c7cb8f" }, "downloads": -1, "filename": "python-mandrill-inbound-0.0.3.tar.gz", "has_sig": false, "md5_digest": "a1fa25607703a929b70925fe1838311f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4608, "upload_time": "2014-07-17T01:35:10", "url": "https://files.pythonhosted.org/packages/ce/c2/f037b823aac2897b2536e17dc1a3a745b185326c70fae89744ccb269f9b2/python-mandrill-inbound-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "3d898bf8376f7f3eb60ed663d216c91e", "sha256": "50bb462d8004dd69a552b962fccfc3872db5bbb76ead92850db50b13c132914c" }, "downloads": -1, "filename": "python-mandrill-inbound-0.0.4.tar.gz", "has_sig": false, "md5_digest": "3d898bf8376f7f3eb60ed663d216c91e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4669, "upload_time": "2014-08-10T21:20:37", "url": "https://files.pythonhosted.org/packages/2d/9a/6495636a5525757decee372e07b79a783cacfba72b4b2b2b1d66eef2576e/python-mandrill-inbound-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3d898bf8376f7f3eb60ed663d216c91e", "sha256": "50bb462d8004dd69a552b962fccfc3872db5bbb76ead92850db50b13c132914c" }, "downloads": -1, "filename": "python-mandrill-inbound-0.0.4.tar.gz", "has_sig": false, "md5_digest": "3d898bf8376f7f3eb60ed663d216c91e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4669, "upload_time": "2014-08-10T21:20:37", "url": "https://files.pythonhosted.org/packages/2d/9a/6495636a5525757decee372e07b79a783cacfba72b4b2b2b1d66eef2576e/python-mandrill-inbound-0.0.4.tar.gz" } ] }