No project description provided
Project description
Django Webhooks ![badge](https://pypi-camo.freetls.fastly.net/c854d95b79144d5fe63440d442b9ede93a2f23d2/68747470733a2f2f6769746875622e636f6d2f64616e69686f646f7669632f646a616e676f2d776562686f6f6b2f616374696f6e732f776f726b666c6f77732f63692e796d6c2f62616467652e7376673f6576656e743d70757368)
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
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
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
django_webhook-0.0.13.tar.gz
(10.7 kB
view hashes)
Built Distribution
Close
Hashes for django_webhook-0.0.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c39cf8c43e0c6de150493ec25ed4e4de5c0bfa9033f8962601c4d717b6ae04f |
|
MD5 | 1b66d58dedd4fe408007e181ff772c8f |
|
BLAKE2b-256 | 1bcc1656a3560c34e26d7a54c2ba7db1f76b52b66f8a9b8e43cf4a96c4e63e73 |