{ "info": { "author": "coolharsh55", "author_email": "me@harshp.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Topic :: Communications :: Email" ], "description": "SendGrid Inbound Parse Emails\n-----------------------------\n\nParses SendGrid's Inbound Parse Emails into a dictionary of fields from POST parameters.\n\nThe Parse API will *POST* the parsed email to a *URL* specified in the\nSendgrid settings. If *POST* is unsuccesful,\nSendGrid automatically queues and\nretries any POSTs that respond with a `4XX` or `5XX` status.\nTo prevent redelivery or queueing of the mail, respond with `2XX`.\nMessages that cannot be delivered after **3 days** will be dropped.\n\nSee `SendGrid documentation\n`_\nfor more details.\n\n\nPOST Parameters\n---------------\n\nThe POST parameters are available from the returned dictionary with the following keys:\n\n* **headers**: *raw* headers of the email\n\n* **text**: text body of the email.\n If not set, the email did not have a text body.\n\n* **html**: HTML body of the email.\n If not set, the email did not have a HTML body.\n\n* **from**: email sender taken from message headers.\n\n* **to**: email recipient field taken from message headers.\n\n* **cc**: email cc field taken from message headers.\n\n* **subject**: email subject.\n\n* **dkim**: a *JSON* string containing the verification results of any\n dkim and domain keys signatures in the message.\n\n* **SPF**: results of Sender Policy Framework verification of the\n message sender and receiving IP address.\n\n* **envelope**: *JSON* string containing the *SMTP* envelope.\n Has two variables:\n\n 1. **to**: a single-element array containing the receiving address;\n 2. **from**: return path of the message.\n\n* **charsets**: *JSON* string for character set of fields extracted.\n\n* **spam_score**: Spam Assassin's rating for whether this is *spam*.\n\n* **spam_report**: Spam Assassin's spam report.\n\n* **attachments**: List containing file objects ordered by attachment number in email.\n If available, file object/stream will be appended to the list.\n If no file objects/streams are available, the attachment dictionary keys will be appended.\n These keys can be then used to access the attachments.\n Keys are the string ``attachment`` suffixed by n\n where n is in 1...N with N being the total number of attachments\n\n* **attachment-info**: *JSON* string containing `attachmentX` keys\n with another *JSON* string as the value.\n Contains the keys *filename*, *type* (media type)\n\n* **errors**: All errors are silently ignored and are returned as strings in a dictionary\n whose keys are the other keys. So, for e.g. an error about parsing *subject* is available as\n ``mail['errors']['subject']``\n\n\nHelper utilities\n----------------\n\nThe ``sendgrid_parse.helpers`` contains utilities for **flask** and **django**\nthat use the correct request variables to access the POST data and attachments.\nThese are wrappers around the ``parse`` method\nand do not contain any framework specific except for naming and access conventions.\n\n\nUsage\n-----\n\nThe package is available under :code:`sendgrid_parse`.\n\n.. code:: python\n\n # install\n pip install sendgrid_parse\n\n # plain python (args: POST dictionary, files dictionary)\n from sendgrid_parse import parse\n mail = parse(post_dict, file_dict)\n\n # for flask\n from sendgrid_parse.helpers.flask import parse\n # for django\n from sendgrid_parse.helpers.django import parse\n\n mail = parse(request)\n\n\nGithub Repository\n-----------------\n\n`sendgrid_parse\n`_", "description_content_type": null, "docs_url": "https://pythonhosted.org/sendgrid_parse/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/coolharsh55/sendgrid_parse", "keywords": "sendgrid inbound parse email flask django", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "sendgrid_parse", "package_url": "https://pypi.org/project/sendgrid_parse/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sendgrid_parse/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/coolharsh55/sendgrid_parse" }, "release_url": "https://pypi.org/project/sendgrid_parse/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "Access SendGrid's Inbound Parse emails into a dictionary", "version": "0.2.1" }, "last_serial": 1838505, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "65d5856baf376863ca416635b064a4d6", "sha256": "a9f8831e5297047e43d313dabf0c51b0f21b4a4615bb84380688d93080a6fd7c" }, "downloads": -1, "filename": "sendgrid_parse-0.1.tar.gz", "has_sig": false, "md5_digest": "65d5856baf376863ca416635b064a4d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3726, "upload_time": "2015-11-26T16:28:44", "url": "https://files.pythonhosted.org/packages/e2/67/3f5762b40737c68fed580af2da15f2b647b53661199b6eb9650e3418d6b4/sendgrid_parse-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "07c89deacc2faabf05b9beca77e4ff6d", "sha256": "cd2e203cd7ddcdfb7c9529f6c0fb71246e716048bab47f4ec0583e6ae4072f42" }, "downloads": -1, "filename": "sendgrid_parse-0.2.tar.gz", "has_sig": false, "md5_digest": "07c89deacc2faabf05b9beca77e4ff6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4794, "upload_time": "2015-11-29T19:57:22", "url": "https://files.pythonhosted.org/packages/e0/80/6ca12be54e89f016b9f15fc258394d3462b3b9c1a93bde0b9f65ac183002/sendgrid_parse-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "be10e22a06fc210b958adfac732d7aa9", "sha256": "c7fb9ec46f185ce47a93b5ed7ce4925d21a32179e7adc2dfe06d2988b2ae96bc" }, "downloads": -1, "filename": "sendgrid_parse-0.2.1.tar.gz", "has_sig": false, "md5_digest": "be10e22a06fc210b958adfac732d7aa9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4800, "upload_time": "2015-11-29T20:14:47", "url": "https://files.pythonhosted.org/packages/8f/48/bbc9198b19a9e03e6cb36c8889df9301281fbcb1d62bd393e7cbe96be1fa/sendgrid_parse-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "be10e22a06fc210b958adfac732d7aa9", "sha256": "c7fb9ec46f185ce47a93b5ed7ce4925d21a32179e7adc2dfe06d2988b2ae96bc" }, "downloads": -1, "filename": "sendgrid_parse-0.2.1.tar.gz", "has_sig": false, "md5_digest": "be10e22a06fc210b958adfac732d7aa9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4800, "upload_time": "2015-11-29T20:14:47", "url": "https://files.pythonhosted.org/packages/8f/48/bbc9198b19a9e03e6cb36c8889df9301281fbcb1d62bd393e7cbe96be1fa/sendgrid_parse-0.2.1.tar.gz" } ] }