# Django Webhooks ![badge](https://github.com/danihodovic/django-webhook/actions/workflows/ci.yml/badge.svg?event=push)
A plug-and-play Django app for sending outgoing webhooks on model changes.
Django has a built-in signal system which allows programmers to schedule functions to be executed on
model changes. django-webhook leverages the signal system together with Celery to send HTTP requests
when models change.
Suppose we have a User model
```python
class User(models.Model):
name = models.CharField(max_length=50)
age = models.PositiveIntegerField()
```
If a webhook is configured, any time the above model is created, updated or deleted django-webhook
will send an outgoing HTTP request to a third party:
```
POST HTTP/1.1
host: webhook.site
user-agent: python-urllib3/2.0.3
django-webhook-uuid: 5e2ee3ba-905e-4360-94bf-18ef21c0e844
django-webhook-signature-v1:
django-webhook-request-timestamp: 1697818014
{
"topic": "users.User/create",
"object": {
"id": 3,
"name": "Dani Doo",
"age": 30
},
"object_type": "users.User",
"webhook_uuid": "5e2ee3ba-905e-4360-94bf-18ef21c0e844"
}
```
### 🔥 Features
- Automatically sends webhooks on model changes
- Leverages Celery for processing
- Webhook authentication using HMAC
- Retries with exponential backoff
- Admin integration
- Audit log with past webhook events
- Protection from replay attacks
- Allows rotating webhook secrets
### 📖 Documentation
https://django-webhook.readthedocs.io
### Contributors
<a href="https://github.com/danihodovic/django-webhook/graphs/contributors">
<img src="https://contrib.rocks/image?repo=danihodovic/django-webhook" />
</a>
Made with [contrib.rocks](https://contrib.rocks).
Raw data
{
"_id": null,
"home_page": "https://github.com/danihodovic/django-webhook",
"name": "django-webhook",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": "webhooks, http, microservices",
"author": "Dani Hodovic",
"author_email": "you@example.com",
"download_url": "https://files.pythonhosted.org/packages/51/90/91ec8cc94c76b2b131a98df9e5bd149c47fb1f4d0f6d625211f5381cbb98/django_webhook-0.0.14.tar.gz",
"platform": null,
"description": "# Django Webhooks ![badge](https://github.com/danihodovic/django-webhook/actions/workflows/ci.yml/badge.svg?event=push)\n\nA plug-and-play Django app for sending outgoing webhooks on model changes.\n\nDjango has a built-in signal system which allows programmers to schedule functions to be executed on\nmodel changes. django-webhook leverages the signal system together with Celery to send HTTP requests\nwhen models change.\n\nSuppose we have a User model\n```python\nclass User(models.Model):\n name = models.CharField(max_length=50)\n age = models.PositiveIntegerField()\n```\n\nIf a webhook is configured, any time the above model is created, updated or deleted django-webhook\nwill send an outgoing HTTP request to a third party:\n\n```\nPOST HTTP/1.1\nhost: webhook.site\nuser-agent: python-urllib3/2.0.3\ndjango-webhook-uuid: 5e2ee3ba-905e-4360-94bf-18ef21c0e844\ndjango-webhook-signature-v1:\ndjango-webhook-request-timestamp: 1697818014\n\n{\n \"topic\": \"users.User/create\",\n \"object\": {\n \"id\": 3,\n \"name\": \"Dani Doo\",\n \"age\": 30\n },\n \"object_type\": \"users.User\",\n \"webhook_uuid\": \"5e2ee3ba-905e-4360-94bf-18ef21c0e844\"\n}\n```\n\n### \ud83d\udd25 Features\n- Automatically sends webhooks on model changes\n- Leverages Celery for processing\n- Webhook authentication using HMAC\n- Retries with exponential backoff\n- Admin integration\n- Audit log with past webhook events\n- Protection from replay attacks\n- Allows rotating webhook secrets\n\n### \ud83d\udcd6 Documentation\n\nhttps://django-webhook.readthedocs.io\n\n\n### Contributors\n<a href=\"https://github.com/danihodovic/django-webhook/graphs/contributors\">\n <img src=\"https://contrib.rocks/image?repo=danihodovic/django-webhook\" />\n</a>\n\nMade with [contrib.rocks](https://contrib.rocks).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": null,
"version": "0.0.14",
"project_urls": {
"Documentation": "https://django-webhook.readthedocs.io/en/latest/",
"Homepage": "https://github.com/danihodovic/django-webhook",
"Repository": "https://github.com/danihodovic/django-webhook"
},
"split_keywords": [
"webhooks",
" http",
" microservices"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a57177c5a2169e41842591bf0adf8b434ebc7f94e4484622d3f47b22e648b703",
"md5": "75de7f8f66e6e8592b4b183a234c1d56",
"sha256": "f9fe365ed24a7990532f5f79465346b12c48e9a04a34454c8fefd820688b8041"
},
"downloads": -1,
"filename": "django_webhook-0.0.14-py3-none-any.whl",
"has_sig": false,
"md5_digest": "75de7f8f66e6e8592b4b183a234c1d56",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 15776,
"upload_time": "2024-07-26T19:13:48",
"upload_time_iso_8601": "2024-07-26T19:13:48.828154Z",
"url": "https://files.pythonhosted.org/packages/a5/71/77c5a2169e41842591bf0adf8b434ebc7f94e4484622d3f47b22e648b703/django_webhook-0.0.14-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "519091ec8cc94c76b2b131a98df9e5bd149c47fb1f4d0f6d625211f5381cbb98",
"md5": "e96665b94106411f587f0bba51b957c6",
"sha256": "bcf1e15b1341c5bfef886b715ab376aa5a8432ed06ea654703a8257c7b4f05c5"
},
"downloads": -1,
"filename": "django_webhook-0.0.14.tar.gz",
"has_sig": false,
"md5_digest": "e96665b94106411f587f0bba51b957c6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 10927,
"upload_time": "2024-07-26T19:13:50",
"upload_time_iso_8601": "2024-07-26T19:13:50.362647Z",
"url": "https://files.pythonhosted.org/packages/51/90/91ec8cc94c76b2b131a98df9e5bd149c47fb1f4d0f6d625211f5381cbb98/django_webhook-0.0.14.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-26 19:13:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "danihodovic",
"github_project": "django-webhook",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-webhook"
}