Skip to main content
Build Status Documentation Status https://img.shields.io/pypi/v/prismh.core.svg https://img.shields.io/pypi/l/prismh.core.svg

PRISMH.CORE Overview

PRISMH.CORE is a Python package that provides basic validation and formatting functionality for data structures that adhere to the PRISMH specifications.

Example Usage

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

>>> from prismh.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 prismh
$ cd prismh
$ . bin/activate
$ hg clone ssh://hg@bitbucket.org/prometheus/prismh.core
$ pip install -e ./prismh.core[dev]

Metadata

Release files for prismh.core 0.4.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 prismh.core 0.4.0
File Size Uploaded Provenance
prismh.core-0.4.0.tar.gz 32.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for prismh.core 0.4.0
File Interpreter ABI Platform
prismh.core-0.4.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 62.9 kB

Release files / prismh.core-0.4.0.tar.gz

Download URL prismh.core-0.4.0.tar.gz
Size 32.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7bf02dbc577037c8c49fe9e6fbb022ce74fdce229bfccb5933dfc51f1fb298ee
BLAKE2b-256 checksum
How to use checksums
3fb08411fc6bc21d98592cc02deb1876826b43d768ea4157fed47d4fa3a14729
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / prismh.core-0.4.0-py2.py3-none-any.whl

Download URL prismh.core-0.4.0-py2.py3-none-any.whl
Size 30.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
9048c39984ff62a6aa9b7c489dcd677e1c6a0a29ebf05f9f3685b5ee3b6377c4
BLAKE2b-256 checksum
How to use checksums
821af2ce882327bdc43493f5b4043f0e426d3cd90ebd7581c5f3af6a4db369b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for prismh.core 0.4.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.

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