App to produce Cloudevents from Django model signals
Project description
===== Django signals cloudevents
This apps allow you to produce Clouevents <https://cloudevents.io/>
_ starting from your models signals sending them to a configurable url (sink).
This app is mainly intended to transform a Django instance into a Knative source, through a SinkBinding or ContainerSource.
For more information visit the Knative eventing documentation <https://knative.dev/docs/eventing/>
_
Quick start
-
Add "django_signals_cloudevents" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [ ... 'django_signals_cloudevents', ]
-
Register your models like this::
from django_signals_cloudevents import send_cloudevent
post_save.connect(send_cloudevent, sender=YourModel)
-
[Optional] As said previously, by default this app is configured to be used with a SinkBinding and get sink url from the environment variable K_SINK and the source name from K_SOURCE. It is possible to override the chosen env variable in your project settings, here is the default configuration::
CLOUDEVENTS_ENV = { "SINK_VAR": "K_SINK", "SOURCE_VAR": "K_SOURCE" }
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for django-signals-cloudevents-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7ce6a031cfc51db4fe39b3fda55dd8dc411e91c810cedd2a614834a56e67676 |
|
MD5 | 066c788fcbd0d3649cf8e186a6fe5557 |
|
BLAKE2b-256 | 3a3152edbee25c7659470708995b8a92e1990558378639f65d704c1a9d7b78e1 |