Skip to main content

No project description provided

Project description

Django Observable Models

Django Observable Models allows you to subscribe to model operations using rxpy Observables. This is particularly useful for implementing things like GraphQL subscriptions.


$ pip install django-observable-models


# yourapp/
from observable_models.models import ObservableModel

class YourModel(ObservableModel):

# Subscribe to model creation
YourModel.model_events.pipe(filter(lamda event: event['operation'] == YourModel.CREATED))

# Subscribe to model updates 
YourModel.model_events.pipe(filter(lamda event: event['operation'] == YourModel.UPDATED))

# Subscribe to model deletion 
YourModel.model_events.pipe(filter(lamda event: event['operation'] == YourModel.DELETED))

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-observable-models, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size django_observable_models-0.4.0-py3-none-any.whl (2.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-observable-models-0.4.0.tar.gz (1.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page