Skip to main content

Parsing and Validation Library for RIOS Files

Project description

Build Status API Documentation 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.8.1.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

rios.core-0.8.1-py2.py3-none-any.whl (31.8 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for rios.core-0.8.1.tar.gz
Algorithm Hash digest
SHA256 48f2bceb6aa1614b4a532bcf76a22adbf0280c6e4bc8e23412669035c19678d8
MD5 a3b219f1250980a58634ab51b046f1a8
BLAKE2b-256 9e0dcfb56c3ac1d3899f38078969199ea8b65d9dae9a6733e42b1c85c7b715dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rios.core-0.8.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 213c59c5ca2d56228d8a6d592bc886fa5fcfa85d6485af202115723841779fca
MD5 abb577eeeb55b28272a1d65066184619
BLAKE2b-256 5d9b6103a22a708ff8391b362cb60d97b092c6447a807e3757f0e1edc596e526

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