kinto-wizard is a tool to configure a kinto server from an YAML file.
Project description
kinto-wizard
kinto-wizard is a tool that lets you setup an entire Kinto server from a Yaml file, or inspect an existing server and output a Yaml file.
You can define Kinto objects (bucket, collection, groups, records) and configure their attributes and permissions.
Read more information about the file structure
Installation
The last release
pip install kinto-wizard
The development version
After having cloned the repo:
pip install -e .
How to use it?
Load
kinto-wizard load \ --server https://kinto-writer.stage.mozaws.net/v1 \ --auth admin:credentials \ new-config.yml
Dump
kinto-wizard dump \ --server https://kinto-writer.stage.mozaws.net/v1 \ --auth admin:credentials \ > current-config.yml
The dump also accepts a --full option that will output object data and collection records.
Validate a dump
The way Kinto works is by letting you change a collection schema but won’t enforce the new schema for existing records.
When you dump a collection and its records, you can end-up having records that Kinto won’t let you upload back because the schema changed and they are invalid with the current schema.
This can lead to unexpected behavior on loading time which is a bit cumbersome because depending of the size of the file you are loading, it can takes a long time before getting an actual error.
In order to fix the file before loading, you can use the validate command that would give you the error Kinto would return if you were to load the file on a Kinto server.
kinto-wizard validate current-config.yml
Changelog
This document describes changes between each past release.
4.0.1 (2018-12-10)
Bug fixes
- Handle Draftv4 schema validation for empty required.
4.0.0 (2018-12-10)
Breaking changes
- kinto-wizard load now expects to find a buckets: root level in the YAML file. And kinto-wizard dump will now add it (fixes #59)
New feature
- Add a validate command to run JSON schema validation on the records locally. (fixes #61)
Internal changes
- To ease the transition between kinto-wizard 3 and kinto-wizard 4, handle both for a couple of releases. (#64)
3.0.0 (2018-10-17)
Breaking changes
- Upgrade to kinto-http.py 10.0 means that the batch will fail if one of the server responses has a 4XX status, use the --ignore-batch-4xx to keep the previous behaviour.
New features
- Add an --ignore-batch-4xx option to explicitly ask for silent 4xx errors.
Bug fixes
- Handle YAML date and datetime values. (#51)
Internal changes
- Add test for YAML node anchors support (#52) See https://en.wikipedia.org/wiki/YAML#Advanced_components
2.4.0 (2018-05-23)
- Add a --dry-run for the load command to see how many records would be deleted. (#46)
- Add a --delete-record to delete the existing records that are not in the YAML file. (#47)
2.3.0 (2017-10-04)
- Add --data and --records options to be able to dump objects data without dumping records. (#33)
2.2.0 (2017-09-01)
New features
- Use asyncio to add parallelism to the load command (#18).
2.1.0 (2017-06-28)
New features
- Add logger configuration for kinto-http.py (#26)
- Add an option to force the update with a CLIENT_WINS strategy (#28)
- Add an option to select the bucket or collection to export (#30)
2.0.0 (2017-05-22)
Breaking changes
- Upgrade to kinto-http 8.0.0 with Python 3.5+ support.
- The --full option of the dump command now outputs records (#16)
New features
- The load command now supports records (#16)
1.0.0 (2016-11-22)
Initial version
- Supports dumping/loading groups and permissions from/to a YAML file.
Contributors
- Rémy Hubscher <rhubscher@mozilla.com>
- Mathieu Leplatre <mathieu@mozilla.com>
- Gabriela Surita <gabsurita@gmail.com>
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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size kinto_wizard-4.0.1-py3-none-any.whl (16.3 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size kinto-wizard-4.0.1.tar.gz (14.5 kB) | File type Source | Python version None | Upload date | Hashes View |
Hashes for kinto_wizard-4.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ccf9a613fb3565c5e72ee2baacb493e8a1f66e62c2ea3ccf5d50b18d23f7886 |
|
MD5 | 8567a36c6c353fa2cdc428fb1416e958 |
|
BLAKE2-256 | 27f698dccdf4a7a5334587be156bf41bfc152fab293bc59cfb42c275f4c76b51 |