Skip to main content

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.12

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:

uv sync
uv run pre-commit install

See Makefile for other useful commands.

Testing

Issue make tests from the root directory.

Metadata

Release files for phir 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 phir 0.4.0
File Size Uploaded Provenance Actions
phir-0.4.0.tar.gz 73.5 kB With provenance Details for phir-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for phir 0.4.0
File Interpreter ABI Platform Actions
phir-0.4.0-py3-none-any.whl Python 3 none any Details for phir-0.4.0-py3-none-any.whl

Total release size: 85.1 kB

Release files / phir-0.4.0.tar.gz

Download URL phir-0.4.0.tar.gz
Size 73.5 kB
Tags Source
SHA-256 checksum
How to use checksums
eb984cb9eade66f4ce33b58b6a3fbf54540d1bc512165368274b74e185bf165e
BLAKE2b-256 checksum
How to use checksums
4708c26b3eecc28d25c1e0870a197a98a7069affe3b7cd8fef90bdfdf7441dfe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / phir-0.4.0-py3-none-any.whl

Download URL phir-0.4.0-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1bf8a9847816d482295b631c9ea26edbba6ba8f81ecdbeb89af3ace2262e8d10
BLAKE2b-256 checksum
How to use checksums
40d5b6f767b9c6620f6032ed0a1dedd2d9b9c38d544cdb3dfcd0d1fff1a3f4c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Security for phir 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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for phir-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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