Kinto Migrations
CLI tool to perform high level migrations using the HTTP API on a Kinto Server.
Installation
With pip:
$ pip install kinto-migrations
Getting stated
Let’s imagine we want to create initialize our Kinto server with some stuff:
$buckets:
private_data:
description: Data that is mine and I may share with frieds.
$groups:
frieds:
members:
- portier:myfriend@gmail.com
$collections:
expenses:
description: Money stuff.
pictures:
$permissions:
read:
- "/buckets/private_data/friends"
public_data:
description: My public data.
$permissions:
read:
- "system.Everyone"
$collections:
blog_posts:
url: "me.github.io"
$records:
hello_world: {}
Let’s save this to a YAML file and run:
$ kinto-migrate --file models.yml --server https://kinto.dev.mozaws.net/v1/ --auth admin:pass
You should specify the server and an authentication token. By default the migrate tool will prompt for a models.yml file on the current directory or you can specify a file using –file` or -f.
This will crete if not exist all the listed endpoints on the Kinto API.
Schema reference
Resources and other reserved words start with a dollar-sign ($). This package supports the basic structure of the Kinto HTTP API.
$buckets:
(...)
$groups:
(...)
$collections:
(...)
$records:
(...)
Any resource data can be included inline under the resource attributes. By default, if no collection schema is provided, any attribute is accepted as in the Kinto API.
$buckets:
my_bucket:
name: My Bucket
tags:
- Mine
- Not yours
Permissions can be setted under any resource using the $permissions attribute.
$buckets:
my_public_bucket:
$permissions:
read:
- system.Everyone
Changelog
0.1.0 (2017-03-12)
First release with basic functionalities.
Release files for kinto-migrations 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kinto-migrations-0.1.0.tar.gz | 8.5 kB | Details |
Release files / kinto-migrations-0.1.0.tar.gz
| Download URL | kinto-migrations-0.1.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7cc821237a54dc06d787ad46882b96dff5cea50ac9353b5efeee93ab72f79f61
|
|
BLAKE2b-256 checksum How to use checksums |
fb7d320a211dd9e2417e22342fcded61acb66e48284ef03ab5443483ed8f5836
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |