Skip to main content

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.

Metadata

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)

Source distribution for kinto-migrations 0.1.0
File Size Uploaded Provenance Actions
kinto-migrations-0.1.0.tar.gz 8.5 kB Without provenance Details for kinto-migrations-0.1.0.tar.gz

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

Security for kinto-migrations 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page