Skip to main content

A data model and validation tool for PHIR (PECOS High-level Intermediate Representation).

Project description

PHIR: PECOS High-level Intermediate Representation

PyPI version Python versions

phir models the PHIR specification as a Pydantic model. See our docs. Included is the tool phir-cli that provides validation and pretty printing on the command line.

Prerequisites

Python >=3.10

Installation

Just issue pip install phir to obtain the latest stable release.

phir CLI

The package includes a CLI for directly validating PHIR JSON files using the command line.

 phir-cli -h
usage: phir-cli [-h] [-s] [-v] [jsonfile]

Validates and pretty prints valid PHIR

positional arguments:
  jsonfile       json file to validate against PHIR spec

options:
  -h, --help     show this help message and exit
  -s, --schema   dump JSON schema of the PHIR model and exit
  -v, --version  show program's version number and exit

Development

Clone the repository and run:

python -m venv .venv
source .venv/bin/activate
pip install -U pip setuptools
pip install -r requirements.txt
pre-commit install

Then, install the project using:

pip install -e .

See Makefile for other useful commands.

Testing

Issue pytest from the root directory.

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

phir-0.3.3.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

phir-0.3.3-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file phir-0.3.3.tar.gz.

File metadata

  • Download URL: phir-0.3.3.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for phir-0.3.3.tar.gz
Algorithm Hash digest
SHA256 18159b1ac342d4af7e6cca7a3b949371b325a7f3c4f20ac1f5e3173a33a56033
MD5 bbfd4bcbff182e1f32c7de9a44580792
BLAKE2b-256 1e3489dc01d1e6dd8c7f56c17c4a8dd7e5afb60184057daf860dda995b951be0

See more details on using hashes here.

File details

Details for the file phir-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: phir-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for phir-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 af6d64088279fb22320815f4fa8e42880fcc32416bedbcd8a5adc6c0eee3e567
MD5 13b8e72aff7dd3634b0b0633c6f5028b
BLAKE2b-256 6a1ded9b8b43ee55c2fcb47dfc13415db1534d521a08b0ba30780d619c1b8523

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