Plug Kinto notifications to a collection endpoint.
Project description
kinto-changes shows the list of collection timestamps, allowing to poll changes on several collections with one HTTP request.
Install
pip install kinto-changes
Setup
In the Kinto settings:
kinto.includes = kinto_changes
# List of buckets/collections to show:
kinto.changes.resources = /buckets/settings
/buckets/blocklists/collections/certificates
The list of timestamps is available at GET /v1/buckets/monitor/collections/changes/records.
Cache Control
Like cache control in Kinto collections, it is possible to configure Cache-Control headers via some settings:
kinto.monitor.changes.record_cache_expires_seconds = 60
Advanced options
The changes entries will have a host attribute, that can be used to distinguish changes from several Kinto instances.
kinto.changes.http_host = website.domain.tld
By default, it will rely on the global setting kinto.http_host.
Changelog
1.3.0 (2018-10-15)
New feature
Add ability to configure cache control headers (#47)
1.2.1 (2018-09-17)
Bug fixes
Don’t do anything during a migrate command (fixes #43).
1.2.0 (2018-09-06)
New feature
Events are now generated on the monitor/changes collection (#41).
1.1.1 (2018-04-17)
Internal changes
Get rid of six
1.1.0 (2017-11-16)
Breaking changes
Upgrade to Kinto 7
Bug fixes
Disable reify to always get the most accurate timestamp. (#36)
1.0.0 (2017-02-14)
Bug fixes
Accessing the monitoring collection when no changes occured don’t fail anymore (fixes #23)
The timestamps shown in the monitoring endpoint are now exactly equal (never superior anymore) to the timestamps of the monitored collections.
Breaking changes
The change endpoint location is now hard-coded (/buckets/monitor/collections/changes/records) and cannot be configured.
The permissions principals cannot be specified anymore. The change endpoint is now always public.
The monitor bucket and changes collection are not required anymore and are not created anymore.
POST and DELETE are not supported on the changes endpoint anymore.
Individual entries (eg. /buckets/monitor/collections/changes/records/{id}) cannot be accessed anymore.
The listener was dropped. Configuration must be changed:
Before:
kinto.event_listeners = changes
kinto.event_listeners.changes.use = kinto_changes.listener
kinto.event_listeners.changes.http_host = website.domain.tld
kinto.event_listeners.changes.collections = /buckets/settings
/buckets/blocklists/collections/certificates
Now:
kinto.changes.http_host = website.domain.tld
kinto.changes.resources = /buckets/settings
/buckets/blocklists/collections/certificates
0.5.0 (2017-01-16)
Do not force the timestamp of monitored entries (#27)
0.4.0 (2016-11-07)
Add the plugin version in the capability (#20)
Add collections in the capability (#18)
Add a specific setting to override global http_host value (#24)
0.3.0 (2016-05-19)
Update to kinto.core for compatibility with Kinto 3.0. This release is no longer compatible with Kinto < 3.0, please upgrade!
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for kinto_changes-1.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69c0c91200cc094d5e0a3ae73d276a1f03b469d1415ab8d27d998c169d3e2476 |
|
MD5 | 2f9afc7350bcf598fa70b1d9483bcc54 |
|
BLAKE2b-256 | d74efd7c927e31036b0844da56d6e5c620e9ad93176f19ef9b7d454fc100cc3d |