Open Targets JSON validator
The opentargets-validator tool in this repository validates JSON files which are submitted to Open Targets by various data sources against the Open Targets JSON schemas.
Installation
pip install --upgrade opentargets-validator
Requirements
- Python 3.8.1 or higher
- Compatible with Python 3.8, 3.9, 3.10, 3.11, 3.12, and 3.13
Usage examples
Validating a local gzipped file against the latest schema version from GitHub:
opentargets_validator \
--schema https://raw.githubusercontent.com/opentargets/json_schema/master/schemas/disease_target_evidence.json \
evidence.json.gz
Validating a portion of the local file against a local copy of the schema:
zcat evidence.json.gz | head -n 100 | opentargets_validator --schema evidence_schema.json
Input files
The validator has to be provided with two inputs:
- Data to validate. It has to contain exactly one complete JSON object per line.
- Schema to validate against. It can be any valid JSON Draft 7 schema.
Either of the input files (data and schema) can be read from:
- STDIN (
-) - Uncompressed remote file (https://example.com/example.json)
- Uncompressed local file (
example.json) - GZIP-compressed local file (
example.json.gz)
Development
Quick start with uv (recommended)
# Install uv and dependencies
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync --dev
# Run tests and linting
uv run pytest
uv run ruff check opentargets_validator tests
Using pip
python -m venv env && source env/bin/activate
pip install -e ".[dev]"
python -m pytest
CI/CD and Releases
This repository uses GitHub Actions for continuous integration.
Releases are automatically published to PyPI via GitHub Actions when tags are created.
Modern Python Tooling
This project has been modernized with:
uvfor fast dependency management and buildsrufffor lightning-fast linting and formattinghatchlingas the modern build backendimportlib.resourcesinstead of deprecatedpkg_resources- GitHub Actions for CI/CD instead of Travis CI
pyproject.tomlfor modern Python project configuration
Metadata
Release files for opentargets-validator 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| opentargets_validator-1.0.1.tar.gz | 13.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| opentargets_validator-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.8 kB
Release files / opentargets_validator-1.0.1.tar.gz
| Download URL | opentargets_validator-1.0.1.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f02b5bbb140fefabf39c4fe77dc81a0a23fd03a487d2d2eb4d081d77995f5cd
|
|
BLAKE2b-256 checksum How to use checksums |
97ce7774066125bf1cd3109d0277f7f93aa552cf34b0c29ee61eaf67efd08b9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Sep 10, 2025.
Transparency logRelease files / opentargets_validator-1.0.1-py3-none-any.whl
| Download URL | opentargets_validator-1.0.1-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5aea06b05cbc350cfd7c22fc19bc290c97f9a0042ef4e9afbd8b86f4f0acb203
|
|
BLAKE2b-256 checksum How to use checksums |
7a37596b35f483d14ce9c7dc2bc31165129e9d905716f0e04d1a7c7cebeffc14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Sep 10, 2025.
Transparency log