Skip to main content

No project description provided

Project description

DJ StreamIO

Framework for making it easy to post stream updates to (stream.io)[https://getstream.io]

Installation

PyPI version

pip install dj-streamio

Configuration

1. Add streamio to INSTALLED_APPS

2. Configure your models for tracking:

e.g.:

class Todo(models.Model, StreamModelMixin):

    collection = 'todos'
    feed_name = 'todo'
    feed_actor_field = 'owner_id'
    feed_once_off_actions = ["create"]
    feed_related_mapping = [
        # feed_slug, model_field
        ('user', 'owner_id'),
        ('todo', 'id'),
    ]
    enrichment_serializer = 'example_app.models.TodoSerializer'

Notes:

  1. We add StreamModelMixin to our model
  2. Add the various meta fields
  3. Profit

now you can now run:

todo = Todo.objects.first()
todo.track_action('create')
todo.track_action('start')
todo.track_action('complete')

TODOS:

  • Provide signals
  • Provide async celery task
  • Provide alternative backends (later)

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

dj-streamio-0.0.1.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file dj-streamio-0.0.1.tar.gz.

File metadata

  • Download URL: dj-streamio-0.0.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for dj-streamio-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8f34c5e2d0a0377c9849a86a97e3003c88a5a63b83bf973a9cbcbb05c940eca4
MD5 9408563a480788d8d67a23b612210017
BLAKE2b-256 8cc7e4c112e9e3bf6348e5e0265d97ef24ed7c44d9f78b5f295e158abb5526fb

See more details on using hashes here.

Supported by

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