Skip to main content

Parsing and Validation Library for RIOS Files

Project description

Build Status Documentation Status https://img.shields.io/pypi/v/rios.core.svg https://img.shields.io/pypi/l/rios.core.svg

RIOS.CORE Overview

RIOS.CORE is a Python package that provides basic validation and formatting functionality for data structures that adhere to the RIOS specifications (formally known as PRISMH).

Example Usage

This package exposes a handful of simple functions for validating and formatting the standard RIOS data structures:

>>> from rios.core import validate_instrument, get_instrument_json

>>> instrument = {"foo": "bar", "id": "urn:my-instrument", "title": "An Instrument Title", "record": [{"id": "field1","type": "text"}], "version": "1.0"}
>>> validate_instrument(instrument)
Traceback (most recent call last):
    ...
colander.Invalid: {'': u'Unrecognized keys in mapping: "{\'foo\': \'bar\'}"'}

>>> del instrument['foo']
>>> validate_instrument(instrument)

>>> print get_instrument_json(instrument)
{
  "id": "urn:my-instrument",
  "version": "1.0",
  "title": "An Instrument Title",
  "record": [
    {
      "id": "field1",
      "type": "text"
    }
  ]
}

For more information on the available functionality, please read the API documentation.

Contributing

Contributions and/or fixes to this package are more than welcome. Please submit them by forking this repository and creating a Pull Request that includes your changes. We ask that you please include unit tests and any appropriate documentation updates along with your code changes.

This project will adhere to the Semantic Versioning methodology as much as possible, so when building dependent projects, please use appropriate version restrictions.

A development environment can be set up to work on this package by doing the following:

$ virtualenv rios
$ cd rios
$ . bin/activate
$ hg clone ssh://hg@bitbucket.org/prometheus/rios.core
$ pip install -e ./rios.core[dev]

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

rios.core-0.5.0.tar.gz (32.9 kB view details)

Uploaded Source

Built Distribution

rios.core-0.5.0-py2.py3-none-any.whl (29.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file rios.core-0.5.0.tar.gz.

File metadata

  • Download URL: rios.core-0.5.0.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rios.core-0.5.0.tar.gz
Algorithm Hash digest
SHA256 78318b1844cb671faf62cd2d595360bc46bc476fc3e7be38e620dd20f486de3f
MD5 be5c40f636c69645aecd7dbe7afd74d9
BLAKE2b-256 4f728c94ce7973266d8ad65d8e111fbb718a98ca2f76215e537cd1281fc4c3ea

See more details on using hashes here.

File details

Details for the file rios.core-0.5.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for rios.core-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a5950dd4b0f02be3752cccaa6aaeb701000240b4932cc5fcd721d8889381ab57
MD5 7b7e85667c512a2f3e499e6cfdaa8f95
BLAKE2b-256 b2c2f63caa433bcd1d2cf35ecf4883b46005a1f2a0947faf77c6c7666dfb8eb6

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