{ "info": { "author": "Luke Burden", "author_email": "lukeburden@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "# Integrate Zendesk Support into your Django app\n\n[![](https://img.shields.io/pypi/v/django-zengo.svg)](https://pypi.python.org/pypi/django-zengo/)\n[![](https://img.shields.io/badge/license-MIT-blue.svg)](https://pypi.python.org/pypi/django-zengo/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n[![Codecov](https://codecov.io/gh/lukeburden/django-zengo/branch/master/graph/badge.svg)](https://codecov.io/gh/lukeburden/django-zengo)\n[![CircleCI](https://circleci.com/gh/lukeburden/django-zengo.svg?style=svg)](https://circleci.com/gh/lukeburden/django-zengo)\n\n\n## django-zengo\n\n`django-zengo` is a Django app that provides conveniences for integrating with Zendesk.\n\nIt facilitates receiving webhook updates from Zendesk, detecting new tickets and changes to existing tickets.\n\n### Installation ####\n\npip install django-zengo\n\n\n### Usage ###\n\n#### Configuring the webhook ####\n\nZengo comes with a view that processes messages sent by Zendesk and allows you to perform actions upon various Zendesk events.\n\n##### Expose `zengo.views.WebhookView` #####\n\nYou need to configure your application to receive the webhook. To do so simply include it in your URL conf:\n\n```python\nfrom django.contrib import admin\nfrom django.urls import path\n\nfrom zengo.views import WebhookView\n\nurlpatterns = [\n path('admin/', admin.site.urls),\n path('zengo/webhook/', WebhookView.as_view())\n]\n```\n\n\n##### Add required bits to `settings.py` #####\n\nYou need to tell Zengo how to authenticate with Zendesk:\n\n- `ZENDESK_EMAIL` is the email of the Zendesk account you will use to interact with the API.\n- `ZENDESK_TOKEN` generated for the user above in the Zendesk web interface.\n- `ZENDESK_SUBDOMAIN` must match the subdomain used in your Zendesk account.\n\nAs seen below, you need to specify\nAnd you need to set a shared secret so that the webhook view can trust incoming messages from Zendesk:\n\n- `ZENGO_WEBHOOK_SECRET` generated by your good self; make it long and random!\n\nSo, your settings should appear something along the lines of:\n\n```python\nZENDESK_EMAIL = \"iamanemail@example.com\"\nZENDESK_TOKEN = \"\"\nZENDESK_SUBDOMAIN = \"example\"\n\nZENGO_WEBHOOK_SECRET = \"\"\n```\n\n###### Configure Zendesk to send events ######\n\nZendesk allows for many integrations, but for the purposes of Zengo we just need to be told when a ticket has been changed.\n\nLog in as an administrator in Zendesk, and visit `Settings > Extensions > Targets > add target > HTTP target`.\n\nAdd an HTTP target with a URL of your service, and choose the `POST` method. Ensure you've added a `secret` query parameter to the URL where your webhook is accessible, such that the webhook view can authorize Zendesk's webhook sends.\n\nNext, you must configure a trigger to use the target. Visit `Business Rules > Triggers > Add trigger`. Add a condition that suits your needs, such as, `Ticket is updated`, or `Ticket is created`, and select an action of `Notify target`, selecting the previously configured target. For JSON body, enter the following: \n\n```json\n{\n \"id\": \"{{ ticket.id }}\"\n}\n```\n\nYou're done! Now whenever a ticket is created or updated in Zendesk, you should have an event being processed in your application.\n\nNote: for development, I recommend using the excellent [ngrok](https://ngrok.com/) to proxy requests through to your localhost.\n\n#### Performing actions upon receiving Zendesk events ####\n\nWhen Zengo receives a webhook from Zendesk, it will fetch the latest state of the ticket from Zendesk's APIs, compare how this differs to the state in the local database models, and fire a signal indicating what has happened. In your application, you attach receivers to the signal that is most relevant to your need.\n\n```python\nfrom django.dispatch import receiver\n\nfrom zengo.signals import ticket_created\n\n\n@receiver(ticket_created)\ndef handle_new_ticket(sender, ticket, context, **kwargs):\n # perform your custom action here\n pass\n```\n\n#### Signals ####\n\nYou can connect to the following signals.\n\n- `zengo.signals.ticket_created` - fires when a ticket is encountered for the first time.\n- `zengo.signals.ticket_updated` - fires when a ticket previously encountered is changed, or has a new comment added.\n\n\n## Contribute\n\n`django-zengo` supports a variety of Python and Django versions. It's best if you test each one of these before committing. Our [Circle CI Integration](https://circleci.com) will test these when you push but knowing before you commit prevents from having to do a lot of extra commits to get the build to pass.\n\n### Environment Setup\n\nIn order to easily test on all these Pythons and run the exact same thing that CI will execute you'll want to setup [pyenv](https://github.com/yyuu/pyenv) and install the Python versions outlined in [tox.ini](https://github.com/lukeburden/django-zengo/blob/master/tox.ini).\n\nIf you are on Mac OS X, it's recommended you use [brew](http://brew.sh/). After installing `brew` run:\n\n```\n$ brew install pyenv pyenv-virtualenv pyenv-virtualenvwrapper\n```\n\nThen:\n\n```\npyenv install -s 2.7.15\npyenv install -s 3.4.7\npyenv install -s 3.5.4\npyenv install -s 3.6.3\npyenv virtualenv 2.7.15\npyenv virtualenv 3.4.7\npyenv virtualenv 3.5.4\npyenv virtualenv 3.6.3\npyenv global 2.7.15 3.4.7 3.5.4 3.6.3\npip install detox\n```\n\nTo run the test suite:\n\nMake sure you are NOT inside a `virtualenv` and then:\n\n```\n$ detox\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lukeburden/django-zengo", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-zengo", "package_url": "https://pypi.org/project/django-zengo/", "platform": "", "project_url": "https://pypi.org/project/django-zengo/", "project_urls": { "Homepage": "https://github.com/lukeburden/django-zengo" }, "release_url": "https://pypi.org/project/django-zengo/1.3.0/", "requires_dist": [ "django (<3,>=1.11)", "zenpy (<3,>=2.0.11)", "django-konst (<2,>=1)" ], "requires_python": "", "summary": "Integrate Zendesk Support and your Django app", "version": "1.3.0" }, "last_serial": 5838373, "releases": { "1.0.3": [ { "comment_text": "", "digests": { "md5": "b647671a7ca140b780dddf114a9c7dd0", "sha256": "b27d66f6a803fe04f9054fced278a1bbd27834378e5f7217338dd81e2b034a44" }, "downloads": -1, "filename": "django_zengo-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "b647671a7ca140b780dddf114a9c7dd0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12465, "upload_time": "2019-02-06T03:58:20", "url": "https://files.pythonhosted.org/packages/8e/65/4af3b2152150e232534a579df851ec8afa9c30d115a5e77a71c377345297/django_zengo-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da6981cffca65e8ed4abde73400272ba", "sha256": "ad00e50f6b32dc2a90f7160ae1a3072073b10b859174503899523faaa8c6f724" }, "downloads": -1, "filename": "django-zengo-1.0.3.tar.gz", "has_sig": false, "md5_digest": "da6981cffca65e8ed4abde73400272ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15083, "upload_time": "2019-02-06T03:58:22", "url": "https://files.pythonhosted.org/packages/e5/2f/7a9aca7404f32c68a5b5debc1def27a625aa278977afadecec74f87b9a46/django-zengo-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "9c414750c44bd336dd4ef5005ed0dcc0", "sha256": "19a299092293c0ab4437b8201600f5f9402c9808ff147bc0391e71c291ecaad8" }, "downloads": -1, "filename": "django_zengo-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "9c414750c44bd336dd4ef5005ed0dcc0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13767, "upload_time": "2019-02-12T23:55:24", "url": "https://files.pythonhosted.org/packages/2a/be/103936e5749a00a7bb57022c8ee1991cfa9c3366c6720570b1036aa8cce2/django_zengo-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "708a12b8be0586756ace0d72955434b2", "sha256": "34f7db563f463268197c3b763e833214184bb4dd348a64f3e04d86b2cac9ca08" }, "downloads": -1, "filename": "django-zengo-1.0.4.tar.gz", "has_sig": false, "md5_digest": "708a12b8be0586756ace0d72955434b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10992, "upload_time": "2019-02-12T23:55:25", "url": "https://files.pythonhosted.org/packages/bb/19/45bf53d41b53910edb1d682d9f8c3e0413b021564bd94b4918ece7750510/django-zengo-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "a1598d029f5c3b4c7ce2855fcd971401", "sha256": "ae7d0787413de5a5c731a81a379f085ab59c46f39570b592bbddd28cea64efa4" }, "downloads": -1, "filename": "django_zengo-1.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "a1598d029f5c3b4c7ce2855fcd971401", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14588, "upload_time": "2019-02-20T23:06:10", "url": "https://files.pythonhosted.org/packages/85/08/edbc2ed87ca2f9bbaae4541e649e68bf006c11c496c5f7752fa239a43ca9/django_zengo-1.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f9975c3470aa9ed8683f9465ec7fe0ac", "sha256": "75cd8b87adfbbf3806fd7918dd356e19a6c432c9028e014b588a7d348f6e409b" }, "downloads": -1, "filename": "django-zengo-1.0.5.tar.gz", "has_sig": false, "md5_digest": "f9975c3470aa9ed8683f9465ec7fe0ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11644, "upload_time": "2019-02-20T23:06:11", "url": "https://files.pythonhosted.org/packages/28/17/4585e3430d8614ae0be773d99e72b48bc4619edd8a39ea9f4ad1c8c466c1/django-zengo-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "c763f36746bf484e7629058d98b19233", "sha256": "cff838b44a412160476c59f53f96bd80c190088a5e9bc8fac782980d73874041" }, "downloads": -1, "filename": "django_zengo-1.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "c763f36746bf484e7629058d98b19233", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14735, "upload_time": "2019-02-21T20:38:21", "url": "https://files.pythonhosted.org/packages/1c/cf/df007cb9536a7ecc95bee4ed73f67b0fbde07ffa669562f99d66e15ef8c4/django_zengo-1.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bc0f1bd46e2a4cfef3bcaef9a9a001dc", "sha256": "5fb77a3089b52e6e1f539a45c1f03399b119fc644b458176f6e7ca42adc705c0" }, "downloads": -1, "filename": "django-zengo-1.0.6.tar.gz", "has_sig": false, "md5_digest": "bc0f1bd46e2a4cfef3bcaef9a9a001dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11788, "upload_time": "2019-02-21T20:38:22", "url": "https://files.pythonhosted.org/packages/3a/14/27490e0724f1adad132739981df5880c2df04b6d9d4849f74917fb229b5d/django-zengo-1.0.6.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "1721e2c91e7de84c9cc1a81cd6b14896", "sha256": "53b40af0be4b264a51971bc57e4091f9a3b996a7101e5eeadfa8ebba3f4e6114" }, "downloads": -1, "filename": "django_zengo-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1721e2c91e7de84c9cc1a81cd6b14896", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16181, "upload_time": "2019-04-17T20:03:26", "url": "https://files.pythonhosted.org/packages/b0/69/571aa865864bd901a1d9075df01dfc993f637114f55aa09ea224c5598d81/django_zengo-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3ff4c7ec1984b8edcca7db235a05ca20", "sha256": "0d8b5085750c91f99bfd02ae956ee50e682839b31b22bab506ec3352cfd346f8" }, "downloads": -1, "filename": "django-zengo-1.1.0.tar.gz", "has_sig": false, "md5_digest": "3ff4c7ec1984b8edcca7db235a05ca20", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12655, "upload_time": "2019-04-17T20:03:27", "url": "https://files.pythonhosted.org/packages/e7/26/55c7bf3281cd2a779690a7f6fe5a08e27660230acadee0fa11870dc5731a/django-zengo-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "e69d2bbf36c5801add8d18251338f858", "sha256": "04f304080121c9d0dc714829e3a74d35b0b347f4c639ef0361e7e260864f2047" }, "downloads": -1, "filename": "django_zengo-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e69d2bbf36c5801add8d18251338f858", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16805, "upload_time": "2019-06-27T17:49:35", "url": "https://files.pythonhosted.org/packages/f7/40/ab9de3c060b90fe3830a610c01d59f0aeeaa10d78367ba50f5e467bc4ef8/django_zengo-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1c4f80868c76b56562ca800a2259e92a", "sha256": "6de4546cf5da8dc9ee746be4c5d47286aa1069186272428db36ebe8bea6d7ca9" }, "downloads": -1, "filename": "django-zengo-1.2.0.tar.gz", "has_sig": false, "md5_digest": "1c4f80868c76b56562ca800a2259e92a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12869, "upload_time": "2019-06-27T17:49:36", "url": "https://files.pythonhosted.org/packages/40/b5/7e1b7e0bcb4b8824fea584440f192e6c2cb1279d89b38e64123e5fa3674c/django-zengo-1.2.0.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "6d873eb07c8972bed701c21005104460", "sha256": "b722c1651707fbc70658c42b12c0beddc289f88925826891ba4969cf90e002c3" }, "downloads": -1, "filename": "django_zengo-1.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6d873eb07c8972bed701c21005104460", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17038, "upload_time": "2019-09-16T21:56:06", "url": "https://files.pythonhosted.org/packages/94/7a/69893f8f22768fcef5bad9b6ba2183b51f97a2ce504de2e10dfcbac24d03/django_zengo-1.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d88e29eaa36b49a4cbcc60a88f53bc4e", "sha256": "c19fc16a1b5d7862537c5797e795a6dfe9fe9d2d26669d90e24058e1827be9c1" }, "downloads": -1, "filename": "django-zengo-1.3.0.tar.gz", "has_sig": false, "md5_digest": "d88e29eaa36b49a4cbcc60a88f53bc4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13142, "upload_time": "2019-09-16T21:56:08", "url": "https://files.pythonhosted.org/packages/3f/f9/134c701eac9f2f9e53b10b599e27a49a0878ba6519aacdb9e5a4c2733155/django-zengo-1.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6d873eb07c8972bed701c21005104460", "sha256": "b722c1651707fbc70658c42b12c0beddc289f88925826891ba4969cf90e002c3" }, "downloads": -1, "filename": "django_zengo-1.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6d873eb07c8972bed701c21005104460", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17038, "upload_time": "2019-09-16T21:56:06", "url": "https://files.pythonhosted.org/packages/94/7a/69893f8f22768fcef5bad9b6ba2183b51f97a2ce504de2e10dfcbac24d03/django_zengo-1.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d88e29eaa36b49a4cbcc60a88f53bc4e", "sha256": "c19fc16a1b5d7862537c5797e795a6dfe9fe9d2d26669d90e24058e1827be9c1" }, "downloads": -1, "filename": "django-zengo-1.3.0.tar.gz", "has_sig": false, "md5_digest": "d88e29eaa36b49a4cbcc60a88f53bc4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13142, "upload_time": "2019-09-16T21:56:08", "url": "https://files.pythonhosted.org/packages/3f/f9/134c701eac9f2f9e53b10b599e27a49a0878ba6519aacdb9e5a4c2733155/django-zengo-1.3.0.tar.gz" } ] }