https://github.com/airspot-dev/django-signals-cloudevents
https://github.com/airspot-dev/django-signals-cloudevents
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/airspot-dev/django-signals-cloudevents
- Owner: airspot-dev
- License: apache-2.0
- Created: 2020-10-07T08:37:07.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-21T16:18:00.000Z (over 4 years ago)
- Last Synced: 2024-11-08T14:05:14.722Z (7 months ago)
- Language: Python
- Size: 29.3 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
=====
Django signals cloudevents
=====This apps allow you to produce `Clouevents `_ 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 for your [KRules](https://github.com/airspot-dev/krules) application,
through a SinkBinding or ContainerSource.For more information visit the `Knative eventing documentation `_
Quick start
-----------1. Add "django_signals_cloudevents" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [
...
'django_signals_cloudevents',
]2. Register your models like this::
from django_signals_cloudevents import send_cloudevent
post_save.connect(send_cloudevent, sender=YourModel)
3. [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"
}