Skip to main content

Plug Kinto notifications to a collection endpoint.

Project description

https://img.shields.io/travis/Kinto/kinto-changes.svg https://img.shields.io/pypi/v/kinto-changes.svg https://coveralls.io/repos/Kinto/kinto-changes/badge.svg?branch=master

kinto-changes tracks modifications of records in Kinto and stores the collection timestamps into a specific bucket and collection.

This plugin is useful to allow for polling on several collections changes with one HTTP request.

Install

pip install kinto-changes

Setup

In the Kinto settings:

kinto.includes = kinto_changes

kinto.event_listeners = changes
kinto.event_listeners.changes.use = kinto_changes.listener

Now everytime a record is modified, the list of current timestamps is available at GET /v1/buckets/monitor/collections/changes/records.

Filter collections

It is possible to choose which collections are monitored:

kinto.event_listeners.changes.collections = <list of URIs>

For example, to be notified of record updates in the certificates collection, or every collections of the settings bucket:

kinto.event_listeners.changes.collections =
    /buckets/blocklists/collections/certificates
    /buckets/settings

Permissions

By default the list of timestamps is readable by anonymous users (system.Everyone). But the list of authorized principals can be specified in settings:

kinto.event_listeners.changes.principals =
    system.Authenticated
    group:admins
    twitter:@natim

Advanced options

By default, the list of timestamps is available in the changes collection in the monitor bucket. This can be specified in settings:

kinto.event_listeners.changes.bucket = monitor
kinto.event_listeners.changes.collection = changes

If specified in settings, the changes will have a http_host attribute. This can be used to distinguish changes from several Kinto instances.

kinto.http_host = website.domain.tld

Changelog

0.2.0 (2016-04-25)

  • Addition of the changes capability

0.1.0 (2015-12-22)

  • Initial code.

  • Bucket and collection name configuration.

  • Changes read permissions configuration.

  • Selection of buckets and collections to follow configuration.

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

kinto-changes-0.2.0.zip (12.2 kB view details)

Uploaded Source

File details

Details for the file kinto-changes-0.2.0.zip.

File metadata

  • Download URL: kinto-changes-0.2.0.zip
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for kinto-changes-0.2.0.zip
Algorithm Hash digest
SHA256 9e5e8ef636d00a11b143d02534b25711848f5c490e3257a6d206818a6becc5d2
MD5 48670879e481d64c583c0477c5655d02
BLAKE2b-256 7f2b6a41ca2827141effa30e72448f85991816d57c9301fab747c6bce9a6d7a4

See more details on using hashes here.

Supported by

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