No project description provided
Project description
Django Webhooks
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.11.tar.gz
(10.8 kB
view hashes)
Built Distribution
Close
Hashes for django_webhook-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78d8c03c0ee1b12bc4b8ab7ffc73d68bdd54b6a49f2dcb4e50a67154a0a238ec |
|
MD5 | 379ba72062bf512cae4a405eb6ee6fce |
|
BLAKE2b-256 | 255b26284e82ec756dd5d1adb4807f4f6a791c4a542285d9b7edaa63d81fcf0c |