🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

phir

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phir

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

0.3.3
Maintainers
1

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.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts