django-celery-email-reboot


Namedjango-celery-email-reboot JSON
Version 4.0.1 PyPI version JSON
download
home_pagehttps://github.com/Panevo/django-celery-email
SummaryAn async Django email backend using celery (forked from django-celery-email)
upload_time2024-05-28 23:50:23
maintainerNone
docs_urlNone
authorKarlo Krakan
requires_python>=3.8
licenseBSD
keywords
VCS
bugtrack_url
requirements Django celery django-appconf flake8 twine wheel
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ==========================================================
django-celery-email - A Celery-backed Django Email Backend
==========================================================

.. image:: https://img.shields.io/pypi/v/django-celery-email.svg
    :target: https://pypi.python.org/pypi/django-celery-email

A `Django`_ email backend that uses a `Celery`_ queue for out-of-band sending
of the messages.

This is a fork of `django_celery_email`_. As this package has gone unmaintained 
for some time, we have decided to maintain the package in order to maintain 
compatability with future Django versions, starting with Django 4.x and 5.x.

.. _`Celery`: http://celeryproject.org/
.. _`Django`: http://www.djangoproject.org/
.. _`django_celery_email`: https://github.com/pmclanahan/django-celery-email

.. warning::

	This version requires the following versions:

	* Python >= 3.8
	* Django 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 5.0
	* Celery >= 5.0 (note that using Python >= 3.11 requires Celery >= 5.3)

Using django-celery-email
=========================

To enable ``django-celery-email`` for your project you need to add ``djcelery_email`` to
``INSTALLED_APPS``::

    INSTALLED_APPS += ("djcelery_email",)

You must then set ``django-celery-email`` as your ``EMAIL_BACKEND``::

    EMAIL_BACKEND = 'djcelery_email.backends.CeleryEmailBackend'

By default ``django-celery-email`` will use Django's builtin ``SMTP`` email backend
for the actual sending of the mail. If you'd like to use another backend, you
may set it in ``CELERY_EMAIL_BACKEND`` just like you would normally have set
``EMAIL_BACKEND`` before you were using Celery. In fact, the normal installation
procedure will most likely be to get your email working using only Django, then
change ``EMAIL_BACKEND`` to ``CELERY_EMAIL_BACKEND``, and then add the new
``EMAIL_BACKEND`` setting from above.

Mass email are sent in chunks of size ``CELERY_EMAIL_CHUNK_SIZE`` (defaults to 10).

If you need to set any of the settings (attributes) you'd normally be able to set on a
`Celery Task`_ class had you written it yourself, you may specify them in a ``dict``
in the ``CELERY_EMAIL_TASK_CONFIG`` setting::

    CELERY_EMAIL_TASK_CONFIG = {
        'queue' : 'email',
        'rate_limit' : '50/m',  # * CELERY_EMAIL_CHUNK_SIZE (default: 10)
        ...
    }

There are some default settings. Unless you specify otherwise, the equivalent of the
following settings will apply::

    CELERY_EMAIL_TASK_CONFIG = {
        'name': 'djcelery_email_send',
        'ignore_result': True,
    }

After this setup is complete, and you have a working Celery install, sending
email will work exactly like it did before, except that the sending will be
handled by your Celery workers::

    from django.core import mail

    emails = (
        ('Hey Man', "I'm The Dude! So that's what you call me.", 'dude@aol.com', ['mr@lebowski.com']),
        ('Dammit Walter', "Let's go bowlin'.", 'dude@aol.com', ['wsobchak@vfw.org']),
    )
    results = mail.send_mass_mail(emails)

``results`` will be a list of celery `AsyncResult`_ objects that you may ignore, or use to check the
status of the email delivery task, or even wait for it to complete if want. You have to enable a result
backend and set ``ignore_result`` to ``False`` in ``CELERY_EMAIL_TASK_CONFIG`` if you want to use these.
You should also set ``CELERY_EMAIL_CHUNK_SIZE = 1`` in settings if you are concerned about task status
and results.

See the `Celery docs`_ for more info.


``len(results)`` will be the number of emails you attempted to send divided by CELERY_EMAIL_CHUNK_SIZE, and is in no way a reflection on the success or failure
of their delivery.

.. _`Celery Task`: http://celery.readthedocs.org/en/latest/userguide/tasks.html#basics
.. _`Celery docs`: http://celery.readthedocs.org/en/latest/userguide/tasks.html#task-states
.. _`AsyncResult`: http://celery.readthedocs.org/en/latest/reference/celery.result.html#celery.result.AsyncResult

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Panevo/django-celery-email",
    "name": "django-celery-email-reboot",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Karlo Krakan",
    "author_email": "karlo.krakan@panevo.com",
    "download_url": "https://files.pythonhosted.org/packages/a9/d7/87d8a4ab2538834e23ba55a8629eeaded86db1f45273a1d1c3fc34c946d7/django_celery_email_reboot-4.0.1.tar.gz",
    "platform": "any",
    "description": "==========================================================\ndjango-celery-email - A Celery-backed Django Email Backend\n==========================================================\n\n.. image:: https://img.shields.io/pypi/v/django-celery-email.svg\n    :target: https://pypi.python.org/pypi/django-celery-email\n\nA `Django`_ email backend that uses a `Celery`_ queue for out-of-band sending\nof the messages.\n\nThis is a fork of `django_celery_email`_. As this package has gone unmaintained \nfor some time, we have decided to maintain the package in order to maintain \ncompatability with future Django versions, starting with Django 4.x and 5.x.\n\n.. _`Celery`: http://celeryproject.org/\n.. _`Django`: http://www.djangoproject.org/\n.. _`django_celery_email`: https://github.com/pmclanahan/django-celery-email\n\n.. warning::\n\n\tThis version requires the following versions:\n\n\t* Python >= 3.8\n\t* Django 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 5.0\n\t* Celery >= 5.0 (note that using Python >= 3.11 requires Celery >= 5.3)\n\nUsing django-celery-email\n=========================\n\nTo enable ``django-celery-email`` for your project you need to add ``djcelery_email`` to\n``INSTALLED_APPS``::\n\n    INSTALLED_APPS += (\"djcelery_email\",)\n\nYou must then set ``django-celery-email`` as your ``EMAIL_BACKEND``::\n\n    EMAIL_BACKEND = 'djcelery_email.backends.CeleryEmailBackend'\n\nBy default ``django-celery-email`` will use Django's builtin ``SMTP`` email backend\nfor the actual sending of the mail. If you'd like to use another backend, you\nmay set it in ``CELERY_EMAIL_BACKEND`` just like you would normally have set\n``EMAIL_BACKEND`` before you were using Celery. In fact, the normal installation\nprocedure will most likely be to get your email working using only Django, then\nchange ``EMAIL_BACKEND`` to ``CELERY_EMAIL_BACKEND``, and then add the new\n``EMAIL_BACKEND`` setting from above.\n\nMass email are sent in chunks of size ``CELERY_EMAIL_CHUNK_SIZE`` (defaults to 10).\n\nIf you need to set any of the settings (attributes) you'd normally be able to set on a\n`Celery Task`_ class had you written it yourself, you may specify them in a ``dict``\nin the ``CELERY_EMAIL_TASK_CONFIG`` setting::\n\n    CELERY_EMAIL_TASK_CONFIG = {\n        'queue' : 'email',\n        'rate_limit' : '50/m',  # * CELERY_EMAIL_CHUNK_SIZE (default: 10)\n        ...\n    }\n\nThere are some default settings. Unless you specify otherwise, the equivalent of the\nfollowing settings will apply::\n\n    CELERY_EMAIL_TASK_CONFIG = {\n        'name': 'djcelery_email_send',\n        'ignore_result': True,\n    }\n\nAfter this setup is complete, and you have a working Celery install, sending\nemail will work exactly like it did before, except that the sending will be\nhandled by your Celery workers::\n\n    from django.core import mail\n\n    emails = (\n        ('Hey Man', \"I'm The Dude! So that's what you call me.\", 'dude@aol.com', ['mr@lebowski.com']),\n        ('Dammit Walter', \"Let's go bowlin'.\", 'dude@aol.com', ['wsobchak@vfw.org']),\n    )\n    results = mail.send_mass_mail(emails)\n\n``results`` will be a list of celery `AsyncResult`_ objects that you may ignore, or use to check the\nstatus of the email delivery task, or even wait for it to complete if want. You have to enable a result\nbackend and set ``ignore_result`` to ``False`` in ``CELERY_EMAIL_TASK_CONFIG`` if you want to use these.\nYou should also set ``CELERY_EMAIL_CHUNK_SIZE = 1`` in settings if you are concerned about task status\nand results.\n\nSee the `Celery docs`_ for more info.\n\n\n``len(results)`` will be the number of emails you attempted to send divided by CELERY_EMAIL_CHUNK_SIZE, and is in no way a reflection on the success or failure\nof their delivery.\n\n.. _`Celery Task`: http://celery.readthedocs.org/en/latest/userguide/tasks.html#basics\n.. _`Celery docs`: http://celery.readthedocs.org/en/latest/userguide/tasks.html#task-states\n.. _`AsyncResult`: http://celery.readthedocs.org/en/latest/reference/celery.result.html#celery.result.AsyncResult\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "An async Django email backend using celery (forked from django-celery-email)",
    "version": "4.0.1",
    "project_urls": {
        "Homepage": "https://github.com/Panevo/django-celery-email"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "31221163a89f77c8b740aabaaf43f11a9ad219b4f365e5bac7969251259d1aee",
                "md5": "ef611af598ff80645884cca55d92d52e",
                "sha256": "e2a55a2d4f150ee4b11eabce29a0dbbfd401b0efa96b473c470718510d3ac237"
            },
            "downloads": -1,
            "filename": "django_celery_email_reboot-4.0.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ef611af598ff80645884cca55d92d52e",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 8437,
            "upload_time": "2024-05-28T23:50:21",
            "upload_time_iso_8601": "2024-05-28T23:50:21.822038Z",
            "url": "https://files.pythonhosted.org/packages/31/22/1163a89f77c8b740aabaaf43f11a9ad219b4f365e5bac7969251259d1aee/django_celery_email_reboot-4.0.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a9d787d8a4ab2538834e23ba55a8629eeaded86db1f45273a1d1c3fc34c946d7",
                "md5": "0f660456e9c9be1639bb47f6c9f1769b",
                "sha256": "f7b04e7c3a1d6d22021dc5ca1bd3597e974549b9a39a328be5415b81929d3921"
            },
            "downloads": -1,
            "filename": "django_celery_email_reboot-4.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0f660456e9c9be1639bb47f6c9f1769b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 10981,
            "upload_time": "2024-05-28T23:50:23",
            "upload_time_iso_8601": "2024-05-28T23:50:23.945259Z",
            "url": "https://files.pythonhosted.org/packages/a9/d7/87d8a4ab2538834e23ba55a8629eeaded86db1f45273a1d1c3fc34c946d7/django_celery_email_reboot-4.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-28 23:50:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Panevo",
    "github_project": "django-celery-email",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "Django",
            "specs": [
                [
                    ">=",
                    "3.0"
                ]
            ]
        },
        {
            "name": "celery",
            "specs": [
                [
                    ">=",
                    "5.0"
                ]
            ]
        },
        {
            "name": "django-appconf",
            "specs": []
        },
        {
            "name": "flake8",
            "specs": []
        },
        {
            "name": "twine",
            "specs": []
        },
        {
            "name": "wheel",
            "specs": []
        }
    ],
    "tox": true,
    "lcname": "django-celery-email-reboot"
}
        
Elapsed time: 0.32442s