Skip to main content

Django/PostgreSQL implementation of the Meteor DDP service.

Project description

Django/PostgreSQL implementation of the Meteor DDP service, allowing Meteor to subsribe to changes on Django models.

Example usage

# bookstore/ddp.py

from dddp.api import API, Collection, Publication
from bookstore import models

class Book(Collection):
    model = models.Book


class Author(Collection):
    model = models.Author


class AllBooks(Publication):
    queries = [
        models.Author.objects.all(),
        models.Book.objects.all(),
    ]


class BooksByAuthorEmail(Publication):
    def get_queries(self, author_email):
        return [
            models.Author.objects.filter(
                email=author_email,
            ),
            models.Book.objects.filter(
                author__email=author_email,
            ),
        ]


API.register(
    [Book, Author, AllBooks, BooksByAuthorEmail]
)
# start DDP service using default port (8000)
$ manage.py dddp

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

django-ddp-0.2.0.tar.gz (20.1 kB view details)

Uploaded Source

File details

Details for the file django-ddp-0.2.0.tar.gz.

File metadata

  • Download URL: django-ddp-0.2.0.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-ddp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a644f0d050536e98637685c93282f89f33275ebd6ec6fd04e3a5542bb3d2f4aa
MD5 d95cc7351ec4323dd096cc7198576aac
BLAKE2b-256 5c5f5979cf483fb7f1a531f241cc50cc2a85a4075f225d9bbd648cc124d6be71

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page