Skip to main content

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.

Installation

$ pip install django-observable-models

Usage

# yourapp/models.py
from observable_models.models import ObservableModel

class YourModel(ObservableModel):
    pass

# 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))

Metadata

Release files for django-observable-models 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-observable-models 0.4.0
File Size Uploaded
django-observable-models-0.4.0.tar.gz 1.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-observable-models 0.4.0
File Interpreter ABI Platform
django_observable_models-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.3 kB

Release files / django-observable-models-0.4.0.tar.gz

Download URL django-observable-models-0.4.0.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
498d191da78d1d832d0d8704887647f41cf579908926bdcb38ef572fbb1068e1
BLAKE2b-256 checksum
How to use checksums
aa81b6fbbf6777875c21795887dc059bd8b2d8e0d6da0723f8de9e78dc8e94ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.17 CPython/3.7.4 Darwin/19.0.0

Release files / django_observable_models-0.4.0-py3-none-any.whl

Download URL django_observable_models-0.4.0-py3-none-any.whl
Size 2.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef33fa0478578be772e58a66b11b432a4a9cb4411d4838ad5b9a2d1f53418e00
BLAKE2b-256 checksum
How to use checksums
642a824cbebe480914c2b07b2956d39dab44c971099e51766d11ad3e0c344aac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.17 CPython/3.7.4 Darwin/19.0.0

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page