django-alert-winglet


Namedjango-alert-winglet JSON
Version 0.1.8 PyPI version JSON
download
home_page
SummarySeamlessly Send Django or Python Exceptions to Discord Channels!
upload_time2023-08-30 12:53:36
maintainer
docs_urlNone
authorMojtaba
requires_python>=3.10
licenseMIT License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            alert-winglet
=============

A Django app to send any exception to a Discord channel.

Quick start
-----------

Installation
------------

You can install ``django-alert-winglet`` using ``pip``::
    pip install django-alert-winglet

1. Add "alert_winglet" to your `INSTALLED_APPS` setting in your Django project's settings file::

    INSTALLED_APPS = [
        ...,
        "alert_winglet",
    ]

Discord
-------

1. Set the `DISCORD_WEBHOOK_URL` variable in your Django settings. This is the URL of the Discord webhook you want to use for sending exceptions.

2. Use the `DiscordEmbedManager` class to create a Discord Embed object. ::

    from alert_winglet.discord.manager import DiscordEmbedManager

    # If the request is not provided, the `extra_detail` variable will be None
    discord_manager = DiscordEmbedManager(
          exc,
      )
    formatted_exc, extra_detail = discord_manager.format_exception()
    data = discord_manager.prepare_embed_data(formatted_exc, extra_detail)

3. Then use the `DiscordDelivery` class to send the exception to your Discord channel using the webhook.
This class can be used for other purposes as well, like sending messages or files... . ::

    from alert_winglet.discord.sender import DiscordDelivery

    delivery = DiscordDelivery(
        embeds=[
            data,
        ]
    )
    delivery.send()


Requirements
------------

- django >= 3.0
- discord.py >=2.2.3
- requests >=2.28.2

License
-------

This project is licensed under the MIT License.

Bug Reports and Feature Requests
--------------------------------

Please use the GitHub_issue_ tracker to report any bugs or submit feature requests.

Authors
-------

- Mojtaba Davi
- Email: Mojtabadavi14@gmail.com


.. _GitHub_issue: https://github.com/Mojitaba34/alert-winglet/issues

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "django-alert-winglet",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "",
    "author": "Mojtaba",
    "author_email": "Mojtabadavi14@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b5/19/b01bb00277185b5c89200075cb01d35df14520fb8edbcb2938f2a4685bb2/django-alert-winglet-0.1.8.tar.gz",
    "platform": null,
    "description": "alert-winglet\n=============\n\nA Django app to send any exception to a Discord channel.\n\nQuick start\n-----------\n\nInstallation\n------------\n\nYou can install ``django-alert-winglet`` using ``pip``::\n    pip install django-alert-winglet\n\n1. Add \"alert_winglet\" to your `INSTALLED_APPS` setting in your Django project's settings file::\n\n    INSTALLED_APPS = [\n        ...,\n        \"alert_winglet\",\n    ]\n\nDiscord\n-------\n\n1. Set the `DISCORD_WEBHOOK_URL` variable in your Django settings. This is the URL of the Discord webhook you want to use for sending exceptions.\n\n2. Use the `DiscordEmbedManager` class to create a Discord Embed object. ::\n\n    from alert_winglet.discord.manager import DiscordEmbedManager\n\n    # If the request is not provided, the `extra_detail` variable will be None\n    discord_manager = DiscordEmbedManager(\n          exc,\n      )\n    formatted_exc, extra_detail = discord_manager.format_exception()\n    data = discord_manager.prepare_embed_data(formatted_exc, extra_detail)\n\n3. Then use the `DiscordDelivery` class to send the exception to your Discord channel using the webhook.\nThis class can be used for other purposes as well, like sending messages or files... . ::\n\n    from alert_winglet.discord.sender import DiscordDelivery\n\n    delivery = DiscordDelivery(\n        embeds=[\n            data,\n        ]\n    )\n    delivery.send()\n\n\nRequirements\n------------\n\n- django >= 3.0\n- discord.py >=2.2.3\n- requests >=2.28.2\n\nLicense\n-------\n\nThis project is licensed under the MIT License.\n\nBug Reports and Feature Requests\n--------------------------------\n\nPlease use the GitHub_issue_ tracker to report any bugs or submit feature requests.\n\nAuthors\n-------\n\n- Mojtaba Davi\n- Email: Mojtabadavi14@gmail.com\n\n\n.. _GitHub_issue: https://github.com/Mojitaba34/alert-winglet/issues\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Seamlessly Send Django or Python Exceptions to Discord Channels!",
    "version": "0.1.8",
    "project_urls": {
        "Issues": "https://github.com/Mojitaba34/alert-winglet/issues",
        "Source Code": "https://github.com/Mojitaba34/alert-winglet"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b519b01bb00277185b5c89200075cb01d35df14520fb8edbcb2938f2a4685bb2",
                "md5": "78cfbbf5480a3ffe36f7f713df49839a",
                "sha256": "6432ffe5102b428370fc797dc7f505ba60c02ebbc820163a4995c228e3fb391f"
            },
            "downloads": -1,
            "filename": "django-alert-winglet-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "78cfbbf5480a3ffe36f7f713df49839a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 8127,
            "upload_time": "2023-08-30T12:53:36",
            "upload_time_iso_8601": "2023-08-30T12:53:36.387484Z",
            "url": "https://files.pythonhosted.org/packages/b5/19/b01bb00277185b5c89200075cb01d35df14520fb8edbcb2938f2a4685bb2/django-alert-winglet-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-30 12:53:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Mojitaba34",
    "github_project": "alert-winglet",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "django-alert-winglet"
}
        
Elapsed time: 0.11659s