Skip to main content

RA Flatfile importer

Usage

The primary usage of this tool is to validate and load flatfile data (JSON) into OS2mo, for example fixtures generated using ra-flatfile-importer.

Usage: python -m ra_flatfile_importer [OPTIONS] COMMAND [ARGS]...

  OS2mo Flatfile importer.

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

Options:
  --help  Show this message and exit.

Commands:
  schema    Generate JSON schema for valid files.
  upload    Validate the provided JSON file and upload its contents.
  validate  Validate the provided JSON file.

On a development machine with the OS2mo stack running, the following will upload a previously-generated flatfile:

python -m ra_flatfile_importer upload \
  --mo-url=http://localhost:5000 \
  --client-secret=603f1c82-d012-4d04-9382-dbe659c533fb \
  --auth-server=http://localhost:8081/auth \
  --json-file=mo.json

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

python -m ra_flatfile_importer schema --indent=4

Which yields:

{
    "title": "MOFlatFileFormatImport",
    "description": "Flatfile format for OS2mo.\n\nEach chunk in the list is send as bulk / in parallel, and as such 
                    entries\nwithin a single chunk should not depend on other entries within the same chunk.\n\nMinimal 
                    valid example is [].",
    "type": "object",
    "properties": {
        "chunks": {
            ...
        },
        ...
    }
}

Or for validating whether a file is invalid:

python -m ra_flatfile_importer validate < mo.json

Versioning

This project uses Semantic Versioning with the following strategy:

  • MAJOR: Incompatible changes to existing commandline interface
  • MINOR: Backwards compatible updates to commandline interface
  • PATCH: Backwards compatible bug fixes

The fileformat is versioned directly, and the version is exported in the file itself.

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.

Release files for ra-flatfile-importer 2.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ra-flatfile-importer 2.1.1
File Size Uploaded
ra-flatfile-importer-2.1.1.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ra-flatfile-importer 2.1.1
File Interpreter ABI Platform
ra_flatfile_importer-2.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.9 kB

Release files / ra-flatfile-importer-2.1.1.tar.gz

Download URL ra-flatfile-importer-2.1.1.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b68d32d3879e8f038434fe97da8bb72ee4c6d2dc2492bc65581715eb236c3603
BLAKE2b-256 checksum
How to use checksums
4e0e2a77738fa52ed53b94eb180d58940066e8bf4c6da1df1f4b5552e763e5a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.9.10 Linux/5.4.0-1062-gcp

Release files / ra_flatfile_importer-2.1.1-py3-none-any.whl

Download URL ra_flatfile_importer-2.1.1-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c409d6409c4f00a99ce1688418697912b531a045c41d4279f2e0fefc4e807572
BLAKE2b-256 checksum
How to use checksums
be42e0ec7339037b213740e8a84acc3efd3220afd28a45212d40213b128a12dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.9.10 Linux/5.4.0-1062-gcp

Release history Release notifications | RSS feed

This release

2.1.1 This release

2 release files

2.1.0

2 release files

2.0.1

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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