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

proof-of-concept: Track modifications of records in Kinto and store 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 everyone. 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.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.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kinto_changes-0.1.0-py2.py3-none-any.whl (5.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file kinto-changes-0.1.0.tar.gz.

File metadata

  • Download URL: kinto-changes-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for kinto-changes-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bee0bfd202089c09e5054369881bac7843cd5b21297c9cc1a4c128f95a2b440d
MD5 a128d4d60c9552f91dde314c8090a78b
BLAKE2b-256 573b1b715667a1f68a4790d55cfd8c9c4c045bfbfea504f245b3e78605a3e28e

See more details on using hashes here.

File details

Details for the file kinto_changes-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for kinto_changes-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7b35bccebeaa56d4aba57c6c86a8c8a8d4e78609c46b54ca361e77c085b568a7
MD5 5bc63fc171b09fae3e1d7eaa35462001
BLAKE2b-256 3b61b77d3964fe69aa5bcb5b51e7c8c501a04feab75fea8cfda3d7e60ab80602

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