Skip to main content

Flatfile importer for OS2mo/LoRa

Project description

RA Flatfile importer

OS2mo/LoRa flatfile importer.

Build

docker build . -t ra-flatfile-importer

Which yields:

...
Successfully built ...
Successfully tagged ra-flatfile-importer:latest

After which you can run:

docker run --rm ra-flatfile-importer

Which yields:

Usage: flatfile_importer.py [OPTIONS] COMMAND [ARGS]...

  Flatfile importer.

    Used to validate and load flatfile data (JSON) into OS2mo/LoRa.

  Options:
    --help  Show this message and exit.

  Commands:
    lora  Lora Flatfile importer.
    mo    OS2mo Flatfile importer.

Usage

The primary usage of the tool is to upload flat-files to LoRa / OS2mo.

docker run --rm ra-flatfile-importer lora upload < lora.json
docker run --rm ra-flatfile-importer mo upload < mo.json

The tool can generate dummy files to test out this functionality:

docker run --rm ra-flatfile-importer lora generate --name "Aarhus Kommune" > lora.json
docker run --rm ra-flatfile-importer mo generate --name "Aarhus Kommune" > mo.json

These test files should be uploadable to Lora/MO and produce a valid MO instance.

The tool has various other commands too, such as producing the validation schema for the flat file format:

docker run --rm ra-flatfile-importer lora schema --indent 4

Which yields:

{
    "title": "LoraFlatFileFormatModel",
    "description": "Flatfile format for LoRa.\n\nMinimal valid example is {}.",
    "type": "object",
    "properties": {
        "facetter": {
           ...
        },
        ...
    }
}

Or for validating whether a file is invalid:

docker run --rm ra-flatfile-importer lora validate < lora.json

Versioning

This project uses Semantic Versioning with the following strategy:

  • MAJOR: Incompatible changes to existing data models
  • MINOR: Backwards compatible updates to existing data models OR new models added
  • PATCH: Backwards compatible bug fixes

License

  • This project: MPL-2.0
  • Dependencies:
    • pydantic: MIT

This project uses REUSE for licensing. All licenses can be found in the LICENSES folder of the project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ra-flatfile-importer-0.1.1.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

ra_flatfile_importer-0.1.1-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file ra-flatfile-importer-0.1.1.tar.gz.

File metadata

  • Download URL: ra-flatfile-importer-0.1.1.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.10 Linux/5.4.0-1038-gcp

File hashes

Hashes for ra-flatfile-importer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 068fd5ebc06de169388c70c238c20aee643dc7cc66f00f69de6bcb1de8068386
MD5 b1e57a1f0a9b18878820165bf20c7976
BLAKE2b-256 fa2ade20ed2db17b8a0c26bf160a47052e99fcfc26bcde186b1335a0c9dcd883

See more details on using hashes here.

File details

Details for the file ra_flatfile_importer-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ra_flatfile_importer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb20e6e79cbdc7f674859764414d10440e5f7362fe18961ad15dad5eacb17471
MD5 9a062305740633040773b26f1a5bea21
BLAKE2b-256 c6287d9745d5d001b822d65e792dc50046bdc08946b46cd9323ac4600fefd17c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page