A plug-and-play Django app for sending outgoing webhooks on model changes
Project description
Django Model Webhooks
A plug-and-play Django app for sending outgoing webhooks on model changes.
Note: This is a maintained fork of danihodovic/django-webhook, originally created by Dani Hodovic. The upstream project has been inactive since 2024 with unmerged fixes; this fork continues active maintenance, bug fixes, and improvements under the same MIT license. See Credits below.
Django has a built-in signal system which allows programmers to schedule functions to be executed on model changes. django-model-webhooks leverages the signal system together with Celery to send HTTP requests when models change.
Suppose we have a User model
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-model-webhooks 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-model-webhooks-uuid: 5e2ee3ba-905e-4360-94bf-18ef21c0e844
django-model-webhooks-signature-v1:
django-model-webhooks-request-timestamp: 1697818014
{
"topic": "users.User/create",
"object": {
"id": 3,
"name": "Jesse Amarquaye",
"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
Credits
This project began as django-webhook by Dani Hodovic and other upstream contributors. All credit for the original design and implementation goes to them. This fork exists to keep the project maintained, patched, and available on PyPI under active development.
Made with contrib.rocks.
Disclaimer
Django model webhooks is provided as-is and does not require frequent updates. While it remains functional and usable, future updates will be made only if necessary. If you find the project useful but notice a lack of recent activity, this does not mean it is abandoned. Contributions are welcome via pull requests.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_model_webhooks-0.1.0.tar.gz.
File metadata
- Download URL: django_model_webhooks-0.1.0.tar.gz
- Upload date:
- Size: 379.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
646cd1c85a62645d0e9a490ab24b1b5a62102c9b1cb6557e6cc043c0e84ee054
|
|
| MD5 |
d044da2e798b1897c717e335b65439ba
|
|
| BLAKE2b-256 |
575c15e5b4f2a9c1a918551b82ae3d3fd0a3e20291e11ba66ff2200488302596
|
File details
Details for the file django_model_webhooks-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_model_webhooks-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33cd8d1570dc67b1a03f5dac2e96dfbb66d2438b9f24306485fb62632594a1b7
|
|
| MD5 |
7efb9e87528b03fcd7913890174517fa
|
|
| BLAKE2b-256 |
fcbc723029d9ee476aa5026459f3433650f729fe3d97e427363aafca0a82367b
|