GithubHelp home page GithubHelp logo

sayli-karnik / kinto-changes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kinto/kinto-changes

0.0 2.0 0.0 17 KB

Plug Kinto notifications to a collection endpoint.

License: Other

Python 100.00%

kinto-changes's Introduction

Kinto Changes

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

kinto-changes's People

Contributors

natim avatar leplatrem avatar

Watchers

James Cloos avatar Sayli Karnik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.