{ "info": { "author": "Jay Hale", "author_email": "jay@jtst.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Communications :: Email", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "django-sgapi\n============\n\nA Django email backend for the SendGrid API\n\n.. image:: https://travis-ci.org/jtstio/django-sgapi.svg?branch=master\n :target: https://travis-ci.org/jtstio/django-sgapi\n.. image:: https://codecov.io/gh/jtstio/django-sgapi/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/jtstio/django-sgapi\n.. image:: https://badge.fury.io/py/django-sgapi.svg\n :target: https://pypi.python.org/pypi/django-sgapi\n\n\nInstallation\n------------\n\nInstall the backend from PyPI:\n\n.. code:: bash\n\n pip install django-sgapi\n\nAdd the following to your project's **settings.py**:\n\n.. code:: python\n\n EMAIL_BACKEND = \"sgbackend.SendGridBackend\"\n SENDGRID_API_KEY = \"Your SendGrid API Key\"\n\n**Done!**\n\n\nExample\n-------\n\n.. code:: python\n\n from django.core.mail import send_mail\n from django.core.mail import EmailMultiAlternatives\n\n # Send a simple message\n send_mail('Hello there!', 'Emails are the future!',\n 'Jay Hale ', ['hello@sink.sendgrid.net'])\n\n # Send a more complex message\n mail = EmailMultiAlternatives(\n subject='Hello there again!',\n body='Who knew you could do so many things with email?!?',\n from_email='Jay Hale ',\n to=['hello@sink.sendgrid.net'],\n )\n mail.reply_to = 'No Reply '\n mail.template_id = 'marketing_template_5'\n mail.substitutions = {'%organization%': 'jtstio'}\n with open('flyer.pdf', 'rb') as file:\n mail.attachments = [\n ('flyer.pdf', file.read(), 'application/pdf')\n ]\n mail.attach_alternative(\n \"

Who knew you could do so many things with email?!?

\",\n \"text/html\"\n )\n mail.send()\n\n\nAttribution\n-----------\n`sendgrid-django-v5 `_: An\nalternative implementation you should check out\n\n`sendgrid-django `_: Basis for this\nimplementation\n\n`sendgrid-python `_: Python\nSendGrid connector\n\n\nLicense\n-------\nMIT\n\n\nEnjoy :)", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jtstio/django-sgapi", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-sgapi", "package_url": "https://pypi.org/project/django-sgapi/", "platform": "", "project_url": "https://pypi.org/project/django-sgapi/", "project_urls": { "Homepage": "https://github.com/jtstio/django-sgapi" }, "release_url": "https://pypi.org/project/django-sgapi/2.0.0/", "requires_dist": null, "requires_python": "", "summary": "A Django email backend for the SendGrid API", "version": "2.0.0" }, "last_serial": 3254245, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "2c51e80ea6a366ee249466d936ea8efe", "sha256": "c432c001fa414182e097ff666a058c0a2669b4df7704f26254cabcf5bd3f1a0b" }, "downloads": -1, "filename": "django-sgapi-0.0.1.tar.gz", "has_sig": false, "md5_digest": "2c51e80ea6a366ee249466d936ea8efe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3871, "upload_time": "2017-09-21T21:22:45", "url": "https://files.pythonhosted.org/packages/14/13/9cee5752f1e78dd7fbe804aa6a0d071f91661e3a0f77a84ccd13154bc169/django-sgapi-0.0.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "320ea35af0e0782f26995c58335cd40d", "sha256": "5bab236e95ed8a1e305d140e13b6cf931b4e270b5a8fc5ce24c59ff4ac0302e7" }, "downloads": -1, "filename": "django_sgapi-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "320ea35af0e0782f26995c58335cd40d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5944, "upload_time": "2017-10-02T18:28:11", "url": "https://files.pythonhosted.org/packages/2a/78/f856db1d881caf7396f7e61b21f7944a164cb49ecdbbdff81313ef273f4d/django_sgapi-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eebf8394baadc309897879699d827deb", "sha256": "7bf085a4e4f900eedabfe9f8f65696f5842a93058d3436715b78160a0b5f8649" }, "downloads": -1, "filename": "django-sgapi-1.0.0.tar.gz", "has_sig": false, "md5_digest": "eebf8394baadc309897879699d827deb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3741, "upload_time": "2017-10-02T18:28:13", "url": "https://files.pythonhosted.org/packages/b1/4c/2862af6fa1491d2e6659166d16d35d629adb12075f71bb655af1ecd99d0e/django-sgapi-1.0.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "e238c626ba84c2c6f5b33ba42de4e542", "sha256": "7f37918857de3e53a190aab5fe6cc80f1aefb57d0baa5c94f39267fd485335b0" }, "downloads": -1, "filename": "django-sgapi-2.0.0.tar.gz", "has_sig": false, "md5_digest": "e238c626ba84c2c6f5b33ba42de4e542", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4329, "upload_time": "2017-10-16T17:33:03", "url": "https://files.pythonhosted.org/packages/b3/6e/8cb59f968a0f117163d3c61b8bd806c56c3f13379610068302334f5904d7/django-sgapi-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e238c626ba84c2c6f5b33ba42de4e542", "sha256": "7f37918857de3e53a190aab5fe6cc80f1aefb57d0baa5c94f39267fd485335b0" }, "downloads": -1, "filename": "django-sgapi-2.0.0.tar.gz", "has_sig": false, "md5_digest": "e238c626ba84c2c6f5b33ba42de4e542", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4329, "upload_time": "2017-10-16T17:33:03", "url": "https://files.pythonhosted.org/packages/b3/6e/8cb59f968a0f117163d3c61b8bd806c56c3f13379610068302334f5904d7/django-sgapi-2.0.0.tar.gz" } ] }